I want to allow web essentials to compile several less files at once in a specified order. I have worked in the past having gruntjs perform this action but if web essentials can be set up to do this that would make it significantly easier for me.
Asked
Active
Viewed 1,488 times
1 Answers
1
When you say
compile several less files at once in a specified order
If you mean compiling several less files into one, the usual way to do that is with @import
in your main less file.
@import bacon.less;
@import smokey.less;
Web Essentials will then compile this for you, in the order you have them. Either on save or on build, depending on your configuration. Web Essentials will also minify this if you set it to.
All the less features in Web Essentials can be found here.

Colin Bacon
- 15,436
- 7
- 52
- 72
-
Doesn't this require that bacon.less and smokey.less are already compiled? Or can this issue be resolved by setting it to compile on build? – jokul Mar 07 '14 at 02:59
-
The imported less files are not required to be complied. When the page is compiled (either on save or build), it will compile all imported files. – Colin Bacon Mar 07 '14 at 12:11
-
is this functionality only available with certain versions of LESS/Web Essentials? I just tested this and it did not appear to work from only saving. – jokul Mar 07 '14 at 14:26
-
Check your settings, that you have got it set to compile on save. – Colin Bacon Mar 07 '14 at 15:23
-
It compiled the file being saved, but it did not compile the dependencies. – jokul Mar 07 '14 at 15:32