0

Compiling all less files into one stylesheet?

Using the above link I have sucessfully been combining my less files together so that I can easily read my css whilst developing but my end users only have to make one http request to the minimised file...

Is there someway to make the combined.less file which contains something like the following

@import url('one.less');
@import url('two.less');
@import url('three.less');
@import url('four.less');

Rebuild each time I edit any of the files that have been imported into it.

I am using http://vswebessentials.com/ for VS2012

Note.. I would be quite happy if it did this only when publishing/building, however if it were possible to recompile on save even better.

Community
  • 1
  • 1
Matt Skeldon
  • 577
  • 8
  • 23

1 Answers1

1

Taken from web essentials less page

You can set all the compiler settings from Tools -> Options. They include:

  • Compile on save

  • Compile on build

  • Enable minification

This should fulfill your requirement.

Community
  • 1
  • 1
Colin Bacon
  • 15,436
  • 7
  • 52
  • 72
  • Thats much much better. Compile on build was false for some reason. Only downside is publishing does not force a rebuild, so long as I remember to rebuild before publish there is no issue :) – Matt Skeldon Feb 21 '14 at 13:16