阅读更多

6顶
0踩

Web前端
YUI Compressor 2.4.6 发布了。这个版本主要更新了Compressor对 CSS minification 的处理,并引入了单一命令批处理多个文件的功能。

YUI Compressor 是一个用来压缩 JS 和 CSS 文件的工具,采用Java开发。

该版本的亮点:

CSS minification


  • Fixed numerous bugs that break the compressor and/or the resulting minified files.
  • Added documentation on what exactly the minifier does and also which CSS hacks it tolerates.
  • There’s a JavaScript port of CSS min in case it’s more suitable for your build process.Here’s also a test web UI that uses the JavaScript port, where you can experiment with the minifier.
  • A significant number of new tests added (but you can add even more).
  • Safe handling of some CSS features that are getting more adoption such as media queries and CSS3 transforms.
Batch processing

Compressor另一个显著改进就是支持单一命令批处理多个文件,这样能显著减少你处理文件的时间, 特别是当你有大量的文件需要压缩时。

示例:

the following commands minify all .js and .css files and write the minified files with a “-min.css” suffix.

$ java -jar yuicompressor.jar -o '.css$:-min.css' *.css
$ java -jar yuicompressor.jar -o '.js$:-min.js' *.js


下载地址:http://yuilibrary.com/downloads/#yuicompressor


6
0
评论 共 2 条 请登录后发表评论
2 楼 arienya 2011-04-29 10:51
那如何解决的?
1 楼 highsense 2011-04-29 10:00
差点儿没把这东西搞死。它使用了 mozilla的rhino编译器,重写了里面的几个类,然后把自己重写的类打到自己包里。结果运行的时候就报一些奇怪的异常。花了我两天时间才找到原因。

发表评论

您还没有登录,请您登录后再发表评论

相关推荐

Global site tag (gtag.js) - Google Analytics