We’re pleased to announce the immediate availability of version 2.4.6 of the YUI Compressor. This version contains mostly updates related to Compressor’s handling of CSS minification and introduces batch processing of multiple files with a single command.
- 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.
- 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.
Another welcome addition to Compressor is that it can now handle batches of files. This can significantly reduce the time your build process takes, especially if you have a great number of files to minify.
For example the following commands minify all
.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
Thanks go out to Stephen Woods and the Flickr team for this feature!
YUI Compressor 2.4.6 is available for immediate download. Feel free to help us out by filing a bug or feature request, writing more tests, forking the code or joining the conversation.