Skip to content

Instantly share code, notes, and snippets.

@icodejs
Created April 12, 2012 21:18
Show Gist options
  • Save icodejs/2371051 to your computer and use it in GitHub Desktop.
Save icodejs/2371051 to your computer and use it in GitHub Desktop.
ApacheAnt
<!--
Apache Ant provides the ability to combine several files via the concat task. It is im-
portant, however, to remember that JavaScript files usually need to be concatenated in
a specific order to respect dependencies. Once these dependencies have been estab-
lished, using a filelist or a combination of fileset elements allows the order of the
files to be preserved. Here is what the Ant target looks like:
-->
<target name="js.concatenate">
<concat destfile="${build.dir}/concatenated.js">
<filelist dir="${src.dir}"
files="a.js, b.js"/>
<fileset dir="${src.dir}"
includes="*.js"
excludes="a.js, b.js"/>
</concat>
</target>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment