Wednesday, March 17, 2010

Style sheet compression and .less add-in...updated with source



6/2/2010 Update - Project enhanced and now on codeplex!   http://chirpy.codeplex.com/

Design time minification and .net less for style sheets.
Read my previous post on this subject.  






Known Issues
It has been reported that this does not work in 'web site project'.  I do not  use those anymore, not since they brought back our 'web application project'.  If anyone wants to try and make it work, the code is attached.



Source Code
I finally got around to updating this to the latest version of the less engine and api.   In addition, I had been promising source code for a while now.

Click to download

Shout it
kick it on DotNetKicks.com

Tuesday, March 16, 2010

T4MVC Add-In to auto run template

6/2/2010 Update - Project enhanced and now on codeplex!   http://chirpy.codeplex.com/

T4MVC is a fantastic solution to avoid 'Magic Strings' in ASP.NET MVC.   





Thanks to David Ebbo for this contribution which has made its way to MVCContrib.  


Must keep T4 template open and save it once.
This has been the only negative thing about the template.  I thought about writing an Add-In for VS to do this and even taked to David about doing it.  Well, his latest post has inspired me to write one.  I took my dot net less plug in and ripped nearly everything out of it, threw in about 5 lines of new code and it is done.

Configuration
There isn't any.  Just install the add-in and it should work.  It watches for any save, add, or remove event to the solution and runs the T4 template at that time.  As long as you have the T4MVC.tt file in  your project it will run.






Source
I have attached the source and binaries.  I am sure there are some improvements we all can make.


Installation
Simply download the file and double click to install into your Visual Studio Add-in folder.  Currently I only have tested this for VS2008, however should be easy to make work on 2010.  Full Source

What do you think?

Shout it
kick it on DotNetKicks.com