We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You c开发者_JS百科an edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this questionI'm looking to implement UglifyJS into my Ant build process to replace YUI Compressor. What are the basic steps to get started?
After having installed uglifyjs with -g option:
npm install uglify-js -g
Use ant like that:
<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 keep the build.xml cross-platform.
See https://github.com/mishoo/UglifyJS/#usage for all arguments
You can try this -> https://github.com/yuanyan/UglifyJS-java
精彩评论