After installing uglifyjs with the -g option:
npm install uglify-js -g
Use ant as follows:
<exec dir="${build_dir}" executable="uglifyjs.cmd"> <arg line="-o jquery.min.js --unsafe -nc jquery.src.js"/> </exec>
On Windows, you use uglifyjs.cmd and uglifyjs on linux. You can define a conditional property if you want to preserve the cross platform build.xml.
See https://github.com/mishoo/UglifyJS/#usage for all arguments
Tomap source share