静态文件(js css)压缩

JerryXia 发表于 , 阅读 (1,987)

closure-compiler

在处理脚本中设置java环境

set JAVA_HOME=C:\Program Files\jre1.8.0_60
set PATH=%PATH%;,;%JAVA_HOME%\bin\;

压缩js文件:

java -jar compiler.jar --compilation_level WHITESPACE_ONLY --js hello.js --js_output_file hello-compiled.js

Microsoft Ajax Minifier

ajaxmin sourcefile.js –out outputfile.js -clobber

Doc:

  1. http://ajaxmin.codeplex.com/documentation
  2. https://ajaxcontroltoolkit.codeplex.com/wikipage?title=Ajax%20Minifier

添加新评论