uglifyjs压缩js文件
安装
项目地址: https://github.com/mishoo/UglifyJS2
ubuntu下: sudo apt-get install node-uglify
运行
// a.js
function test1(arg1,arg2){
console.log(arg1 + arg2);
}
// 命令行运行
uglifyjs a.js >a.min.js
// b.js 生成的压缩文件
function test1(a,b){console.log(a+b)};