Skip to content

Instantly share code, notes, and snippets.

@smithclay
Created October 22, 2012 00:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save smithclay/3929073 to your computer and use it in GitHub Desktop.
Save smithclay/3929073 to your computer and use it in GitHub Desktop.
<target name="js-compile-all" description="Compile JavaScript files with Closure" unless="skip-js-compile">
<echo>Compiling JS files in ${input.scripts.dir} in closure...</echo>
<apply executable="java" dest="${output.scripts.dir}">
<arg value="-jar"/>
<arg path="${jar.lib.dir}/closure-compiler.jar"/>
<arg line="--js"/>
<srcfile/>
<arg line="--js_output_file"/>
<targetfile/>
<fileset dir="${output.scripts.dir}" includes="**/*-main.debug.js" />
<mapper type="glob" from="*-main.debug.js" to="*-main.min.js"/>
</apply>
<echo>Finished compiling JS files</echo>
</target>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment