0

I'm using SquishIt and have a .less file which I add to a CSS bundle with the following line

.Add("~/content/styles/dev.less")

This compiles as dev.less.debug.css when I build the solution, however I'd like to be able to just save the .less file and it automatically compiles the css (so I see the change instantly in my browser as I would with a traditional CSS file).

I have looked at a number of extensions to achieve this (such as LessExtension and LessCssForVisualStudio) but these require the file to be added to the bundle as dev.css rather than dev.less. Mindscape Web Workbench does not compile LESS files in its free version so I do not know if it also requires dev.css.

I can't change the link to the file as the project will be worked on across teams, where some won't install an extension and will be happy to build the solution to compile.

Is there and extension that automatically compiles LESS that is built to work with SquishIt?

TylerH
  • 20,799
  • 66
  • 75
  • 101
ajcw
  • 23,604
  • 6
  • 30
  • 47

3 Answers3

-1

If you use it on non-production site, I would suggest using less.js (It will render css with js on client-side).

Oren Roth
  • 152
  • 1
  • 11
-1

Squishit uses dotless under the hood, so you could use that directly.. either set it up so that you request the less file and a handler returns CSS or you can use the exe to compile on build and also the watch mode... I'm not sure what's best for you, but you can find more information on the dotless wiki (https://github.com/dotless/dotless/wiki/Using-.less)

Luke Page
  • 8,136
  • 1
  • 20
  • 22
-1

Web essentials does this job perfectly and its free.

http://vswebessentials.com/

pwavg
  • 284
  • 3
  • 15