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?
<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.
With the concat task, using a filelist to preserve order.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With