dotless/dotless — pull request #386 by helephant (2014-07-24 22:29:50+00:00)
Title: System.Web.Optimization bundling for dotless

I've added a library to the project that has a bundle transformer for less files for the System.Web.Optimization framework. Bundling actually turned out a lot easier than the existing web handler because the bundling takes care of things like caching and gzip.

I've debugged it on sample projects at home and am going to try it on a real project at work next week (provided my team are understanding!).

It doesn't have a good solution for debugging files at the moment, but I think compiling less files should work in most situations. I didn't support parameters because it wasn't a feature that I needed.

System.Web.Optimization requires .NET 4 so I've added bundling as a separate project. I also upgraded the Test project so I could put the bundling tests in with the others. Adding a .NET 4 meant I had to upgrade psake, nunit and ilmerge to their latest version to be able to deal with the .NET 4 assemblies.

I created a new nuget package for people who just want to use less for bundling. It installs the less web.config and has the right assembly. I didn't want to add it to the main package because of the .NET 4 dependency.

I wasn't sure I used the IOC container correctly since I wanted to make sure it wasn't visible to people using the LessBundle or LessTransform classes. Let me know if I need to change it (or could just do it better).