开发者

JavaScript compressor

Can you suggest good, free of charge tools (ideally with a command line interface) to compress JavaScript code?

I will take experiences and tips in t开发者_如何学Goo consideration when selecting the best tool.


Google Closure Compiler is fairly popular.


YUI Compressor is a good one that's maintained by Yahoo!


UglifyJS is pretty nice. If you have node.js+npm installed, just do npm install -g uglify-js then use the 'uglifyjs' command.

It achieves similar or better compression than Closure Compiler, with less danger of mangling your code, and is very fast.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜