开发者

How do I use UglifyJS from an Ant build? [closed]

开发者 https://www.devze.com 2023-03-13 16:27 出处:网络
Closed. This question is seeking recommendations for books, tools, software libraries, and more. It does not meet Stack Overflow guidelines guidelines. It is not currently accepting answers.
Closed. This question is seeking recommendations for books, tools, software libraries, and more. It does not meet Stack Overflow guidelines guidelines. It is not currently accepting answers.

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 question

I'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

0

精彩评论

暂无评论...
验证码 换一张
取 消