Honored to be a part of the YUI project, I am now helping with the maintenance of the CSSMin part of the YUICompressor. My changes are now part of the trunk on github, so I'm official. Next on the agenda is documenting the thing, so that's what I'll try to do here, maybe in a few posts. You know, divide and conquer.
You can play with the latest git version of the JS port online here.
If you want to play on your own with the source version of YUICompressor without waiting for the next release, you can build it like so:
- Checkout or download the code from http://github.com/yui/yuicompressor/
- Navigate to the root
antand hit enter
In order for this to work you need a somewhat recent Java SDK installed and also Ant running. (On the Mac, just do
port install apache-ant to get Ant)
This is for the Java version, the JS version needs no building, of course.
There's a bunch of new tests now (and if you want to contribute to the project, you can always write more tests and test cases for any bugs), you can run them with the suite script that Isaac wrote:
The procedure to write new tests is simple:
- Create source CSS file in the
- Create a new file with the expected result and name it with a
You can use the handy-dandy online version to help with the tests creation.
With those details out of the way, the next time I'll talk more about the different things that CSSMin does to your CSS code. Thanks for reading!