ant closure压缩js 目录js/a/1.js, js/a/2.js, js/b/1.js, js/b/2.js 只压缩不合并,如何实现

默认分类 未结 1 523
0须王环殿下0
0须王环殿下0 2023-03-20 05:14
相关标签:
1条回答
  • 2023-03-20 05:54

    首先下载并解压 closure java application。下载地址: http://closure-compiler.googlecode.com/files/compiler-latest.zip在linux系统上,使用wget进行下载:(在google code中直接查询Closure Compile)#wget http://closure-compiler.googlecode.com/files/compiler-latest.zip#unzip compiler-latest.zip得到文件 compiler.jar。再确认一下java是否已经安装好了。这个compiler.jar的使用方式如下:(在命令行执行)java -jar compiler.jar --js hello.js --js_output_file hello-compiled.js或者java -jar compiler.jar --js=in1.js --js=in2.js ... --js_output_file=out.js这样就把 hello.js 压缩成了 hello-compiled.js。更多信息请看帮助:java -jar compiler.jar --help

    0 讨论(0)
提交回复