Handy Wrapper for YUI Compressor

Jan 16, 2011 at 2:03 PM

I've been using a little server control for my CSS minification, called StyleManager. It uses YUI Compressor under-the-hood.

It's easier to add to your site than adding YUI C manually, and its usage is a lot like asp.net's ScriptManager, so it's quick to get used to.

Most importantly - it combines your CSS files too. So instead of having like 10 CSS files to download it'll just be 1, which will also be compressed etc.

Check it out - gStyleManager.com

Jan 17, 2011 at 12:30 AM

Hi Alundgren :)

thanks heaps for the discussion post. It's great to see another project implement YUICompressor.NET :)

(My) idea behind YUICompressor.NET is to never be an in wrapper or process type library, such as via SquishItStyleManagerShinkansen, etc It's a library and .. most importantly to me, includes an MSBuild task for post building.

That said - I can't promote other people enough using the library for their own wrappers, etc. So please! go nuts using it in wrappers, etc :) if anything, this is part of the best feedback I get :) So these projects all have my support 1000000000000% :)

Also, i'll never add any wrappers into the library itself. It's suppose to be a library, so I'm strictly sticking to those separation of concerns.

For myself, I personally like the idea of pre-compressing and pre-combing all the css/js for an application BEFORE it gets deployed to a server. Which is why I made sure I did the MSBuild task so I can't plop it into my post-build scenario's (eg. my Continuous Integration on our Team Foundation Server).

On a side note, the MSBuild task handles combining also. Both JS and CSS :) Has since day one. I never added it to the library itself, because i thought that was the concern of the consuming service. In my case, the MSBuild task. In others, their wrappers. Maybe i'll add it in. The effort is nearly negligible to add that in, TBH :P A collection of results. Then just dump them out as one.

Anyways, thanks heaps for the post and I sincerly hope the wrapper works for you - love hearing stories about people seeing the speed improvement of minifying and combining cs/jss :)