首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 其他教程 > 操作系统 >

Google Closure Compiler压缩javascript代码施用

2012-11-03 
Google Closure Compiler压缩javascript代码使用首先从网上下载代码:windows系统:http://closure-compiler

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。

热点排行