Created
April 12, 2012 21:18
-
-
Save icodejs/2371051 to your computer and use it in GitHub Desktop.
ApacheAnt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
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