Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Changing web essentials output location for compiled less files

How do I change the location where Web Essentials place my compiled Less css files?

like image 764
archaictree Avatar asked May 15 '13 14:05

archaictree


1 Answers

If you are using Visual Studio 2013.

In your Visual Studio menu, there is WEB ESSENTIALS >> Create Solution Settings.

After the solution settings are created, a WebEssentials-Settings.json file will be generated in the Solution Items folder.

Go to the Less section of that file:

"Less": {
"CompileOnBuild": false,
"CompileOnSave": true,
"EnableChainCompilation": true,
"GenerateSourceMaps": true,
"MinifyInPlace": false,

"OutputDirectory": null,
// "OutputDirectory": "..\\..\\Content",

"ProcessSourceMapsForEditorEnhancements": true,
"ShowPreviewPane": true,
"StrictMath": false
},

Edit OutputDirectory. Change null into your target folder. Please note the \ escape character is necessary. The ~\ prefix will not work.


Another place to look at is TOOLS >> Options. In the Options dialog, find Web Essentials group of settings. Under LESS, there is Custom output directory.

When editing in this dialog, no need for the \ escape character. You can input ..\..\Content\CustomCss.


If you happened to use Visual Studio 2012, there is some other application to help. For example, koala.

Here is the link.

This documentation shows how to change the output path.

like image 145
Blaise Avatar answered Nov 19 '22 22:11

Blaise