代码需要压缩,就用google colsure compiler.
在线使用:
点开: http://closure-compiler.appspot.com/home 直接用
或者直接下载:
https://developers.google.com/closure/compiler/
怎么用看看这里
https://developers.google.com/closure/compiler/docs/gettingstarted_app
简单例子:
在控制台,输入命令行:
java -jar compiler.jar --js hello.js --js_output_file hello-compiled.js
可参考
使用Google Closure Compiler高级压缩Javascript代码
官网: https://developers.google.com/closure/compiler/