Minify CSS/JS ant revisited using YUI compressor

Mike Henke post an article about using the YUI compressor to minify the JavaScript and CSS code. He writes:

«I have revisited adding Yui compressor into my work's ant build script to minify JS and CSS scripts. The current jar was yuicompressor-2.3.5.jar . It took a lot of playing around but I finally stumbled on how to get it to work. Here is the snippet for the yuicompressor. I had to jump through a couple hoops like overriding the current js/css scripts with the optimized js/css scripts. I'll release a full working copy in a zip, you can run against your webroot. We achieved an average 18% compression rate for all our js/css files.»

Source:Henke.ws

Comments

I already created a working example and added a build task to concatenate css/jss. You might find it useful. http://simplyolaf.blogspot.com/2009/06/minifying-css-and-js-with-yahoo.html and
http://simplyolaf.blogspot.com/2009/06/minimizing-number-of-http-request...

Are you human

You can use simple HTML-formatting tags(like <b>, <ul>, <code> and others)

Are you human
search engine optimisation
Advertise on this site

Live