YUI Compressor 2.4.6 发布,引入批处理多个文件功能
程序员文章站
2022-04-01 21:49:59
...
YUI Compressor 2.4.6 发布了。这个版本主要更新了Compressor对 CSS minification 的处理,并引入了单一命令批处理多个文件的功能。
YUI Compressor 是一个用来压缩 JS 和 CSS 文件的工具,采用Java开发。
该版本的亮点:
CSS minification
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
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.
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
上一篇: PHP开发文章评论系统
下一篇: Maven使用过程中出现的一些问题