六狼论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博账号登陆

只需一步,快速开始

搜索
查看: 31|回复: 0

Google Closure Compiler压缩javascript代码使用

[复制链接]

升级  20%

2

主题

2

主题

2

主题

童生

Rank: 1

积分
10
 楼主| 发表于 2013-1-29 09:14:07 | 显示全部楼层 |阅读模式
首先从网上下载代码:
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。
您需要登录后才可以回帖 登录 | 立即注册 新浪微博账号登陆

本版积分规则

快速回复 返回顶部 返回列表