代碼須要壓縮,就用google colsure compiler. java
在線使用:segmentfault
點開: http://closure-compiler.appspot.com/home 直接用app
或者直接下載:google
https://developers.google.com/closure/compiler/命令行
怎麼用看看這裏 ip
https://developers.google.com/closure/compiler/docs/gettingstarted_appget
簡單例子: file
在控制檯,輸入命令行:下載
java -jar compiler.jar --js hello.js --js_output_file hello-compiled.jsdeveloper
可參考
使用Google Closure Compiler高級壓縮Javascript代碼
官網: https://developers.google.com/closure/compiler/