public
Created — forked from millermedeiros/build.xml

  • Download Gist
build.xml
XML
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
<?xml version="1.0" encoding="utf-8"?>
<project name="sample-require-js" default="" basedir=".">
<!-- properties -->
<property name="requirejs.dir" value="_build/requirejs" />
<!-- custom tasks -->
<!-- targets -->
<target name="-optimize" description="Combine and minify files.">
<java classname="org.mozilla.javascript.tools.shell.Main">
<classpath>
<pathelement location="${requirejs.dir}/build/lib/rhino/js.jar" />
<pathelement location="${requirejs.dir}/build/lib/closure/compiler.jar" />
</classpath>
<arg value="${requirejs.dir}/bin/x.js"/>
<arg value="${requirejs.dir}/bin"/>
<arg value="${requirejs.dir}/build/build.js"/>
<arg value="${requirejs.optimizer.settings}"/>
</java>
</target>
<target name="optimizeJS">
<echo message="Combining and minifying JS files." />
<antcall target="-optimize">
<param name="requirejs.optimizer.settings" value="_build/js.build.js" />
</antcall>
</target>
<target name="optimizeCSS">
<echo message="Combining and compressing CSS files." />
<antcall target="-optimize">
<param name="requirejs.optimizer.settings" value="_build/css.build.js" />
</antcall>
</target>
</project>
css.build.js
JavaScript
1 2 3 4 5 6
({
appDir: "../style",
baseUrl: "../style",
optimizeCss : "standard",
dir: "../../../deploy/style"
})
js.build.js
JavaScript
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
({
appDir: "../scripts",
baseUrl: "../scripts",
dir: "../../../deploy/scripts",
modules: [
{
name: "main",
include : [
"lib/my_awesome_shared_lib"
],
includeRequire: true
},
{
name : "sections/home/main",
exclude : [
"lib/my_awesome_shared_lib"
]
},
{
name : "sections/gallery/main",
exclude : [
"lib/my_awesome_shared_lib"
]
}
]
})

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.