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.
精彩评论