Pregunta

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.

¿Fue útil?

Solución

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.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top