suasea 发表于 2013-1-29 09:14:07

Google Closure Compiler压缩javascript代码使用

首先从网上下载代码:
windows系统:http://closure-compiler.googlecode.com/files/compiler-latest.zip
liunx系统:
#wget http://closure-compiler.googlecode.com/files/compiler-latest.zip#unzip compiler-latest.zip解压后会看到 complier.jar文件,主要引用此jar包进行压缩,使用如下命令进行压缩JS:E:\google js complier>java -jar compiler.jar --js common.js --js_output_file common_compiler.js这样就把 common.js 压缩成了 common-compiler.js。
页: [1]
查看完整版本: Google Closure Compiler压缩javascript代码使用