Skip to content

Instantly share code, notes, and snippets.

@mikedfunk
Last active December 14, 2015 18:48
Show Gist options
  • Save mikedfunk/5131600 to your computer and use it in GitHub Desktop.
Save mikedfunk/5131600 to your computer and use it in GitHub Desktop.
<!-- combine and minify js. add all js files to the first exec command. -->
<target name="compress_js" description="Combine javascript files to one file, compress with yui compressor.">
<tstamp />
<exec logoutput="true" checkreturn="true"
command="cat ${basedir}/assets/js/bootstrap.js ${basedir}/assets/js/bootstrap2.js > ${basedir}/build/tmp.js" />
<jsMin targetDir="${basedir}/assets/cache" suffix=".min.${DSTAMP}" failOnError="false">
<fileset dir="${basedir}/build">
<include name="tmp.js"/>
</fileset>
</jsMin>
<exec logoutput="true"
command="rm ${basedir}/build/tmp.js" />
</target>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment