Reputation: 4003
I have a bunch of js files that I need to concatenate in some specific order (becuase they are a part of an MVC implementation). How do I do this using ANT?
Upvotes: 8
Views: 4696
Reputation: 6051
<filelist id="filelist" dir="path/to/base/directory">
<file name="util.js"/>
<file name="commons.js" />
</filelist>
<target name="concat-all">
<concat destfile="whatever" encoding="UTF-8" outputencoding="UTF-8" fixlastline="true">
<filelist refid="filelist" />
</concat>
</target>
We use this approach, and later resulting file is compressed via yui-compressor.
Upvotes: 16