1. 老牌的JSMin

jsmin <fulljslint.js >jslint.js “(c)2002 Douglas Crockford”

2. YUI Compressor(可以处理CSS)

使用方法:
//压缩JS
java -jar yuicompressor-2.4.2.jar –type js –charset utf-8 -v src.js > packed.js
//压缩CSS
java -jar yuicompressor-2.4.2.jar –type css –charset utf-8 -v src.css > packed.css

3. Google Closure Compiler

java -jar compiler.jar –help

// Compiling Multiple Scripts
java -jar compiler.jar –js=in1.js –js=in2.js … –js_output_file=out.js