JS 压缩工具 closure compiler
来源:互联网 发布:算法相关的书 编辑:程序博客网 时间:2024/05/16 08:26
文件下载地址
https://code.google.com/p/closure-compiler/downloads/list使用方法:首先进入 compiler.jar这个文件所在的目录
第一种:去掉注释和空格。
java -jar compiler.jar --compilation_level WHITESPACE_ONLY --js hello.js --js_output_file hello-WHITESPACE_ONLY-compiled.js
第二种:去掉注释和空格,变量重命名 (一般情况下都用这个,不容易出错,而且压缩效果也不错。)
java -jar compiler.jar --compilation_level SIMPLE_OPTIMIZATIONS --js hello.js --js_output_file hello-SIMPLE_OPTIMIZATIONS-compiled.js
第三种:重新编译和优化js代码 (慎用)
第三种:重新编译和优化js代码 (慎用)
java -jar compiler.jar --compilation_level ADVANCED_OPTIMIZATIONS --js hello.js --js_output_file hello-ADVANCED_OPTIMIZATIONS-compiled.js
默认压缩方式:和第二种SIMPLE_OPTIMIZATIONS一样
java -jar compiler.jar --js hello.js --js_output_file hello-compiled.js
合并多个js文件
java -jar compiler.jar --js=in1.js --js=in2.js ... --js_output_file=out.js
- JS 压缩工具 closure compiler
- google javascript 代码压缩工具 Closure Compiler
- Google Closure Compiler --js压缩优化
- Google Closure Compiler+Ant压缩文件(Js)
- Google Closure Compiler+Ant压缩文件(Js)
- js压缩工具
- JS压缩工具
- Google Closure Compiler with PHP
- Closure Compiler - JavaScript优化编译器
- javascript优化编译器 - Closure Compiler
- closure compiler application初次尝试
- js closure
- maven中用yuicompressor和closure-compiler对js、css文件进行压缩
- js压缩工具经验分享
- js/css 压缩工具推荐
- js在线压缩工具!
- JS常用压缩工具
- CSS,JS文件压缩工具
- vsftpd主配置文件基本说明
- 【DG实验】搭建physical standby——rman
- 分享一个遍历当前文件夹下所以子目录,并在子目录中执行其他操作的shell脚本
- etc
- paip.TechExcel DevSuite IIS 根目录结构
- JS 压缩工具 closure compiler
- java 连接MySql
- C语言程序设计自学全套视频教程 C++数据结构 编程
- 轻量级的HTTP开发库 Unirest
- SQL 2000分析器連接SQL 2005
- PowerDesigner15.1 逆向工程图解
- Python 26进制计算
- 去除重重复行
- 关于java的String的探讨