如何忽略Web Essentials中的某些LESS文件编译?(引导)

Acr*_*gma 17 css less twitter-bootstrap visual-studio-2012 web-essentials

我已经设置了Web Essentials 2013(在Visual Studio 2012中)并加载了默认的Twitter Bootstrap LESS源文件.自动构建和缩小工作完美,除了Web Essentials相当于工作.当我选择" bootstrap.less",进行更改并保存时,Web Essentials会创建一个新的" bootstrap.css"以及" bootstrap.min.css",其中包含我需要的所有内容.但是当我编辑例如buttons.less,它也会创建buttons.css(和buttons.min.css)(包含所有包含和mixins).实际上,这意味着我将在不同的名称下一遍又一遍地使用几乎相同的css文件.

我可以在保存时声明要忽略的某些文件吗?

cor*_*rax 28

Web Essentials中有一个约定,如果较小文件的名称以下划线(如_utils.less)开头,则在保存时不会将其编译为css.

https://webessentials.uservoice.com/forums/140520-general/suggestions/3319359-don-t-compile-nested-less-files


Acr*_*gma 20

Okay, I figured it out.

What I initially wanted was LESS compilation on build, Web Essentials was so kind to do this on save. To deactivate this, in Visual Studio 2012 head over to Tools -> Options -> Web Essentials -> LESS and deactivate "Generate CSS file on save".

一只忙碌的猫

According to the Visual Studio Extension page for Web Essentials, minification on build works not by now, but will on future releases. I have to delete the .min.css files by myself and create it again on every build as it seems. :(

Pro-tip for every dev:

If you use any framework, tools, extensions etc. and your new super-powers don't work as expected, don't blame the extension, shut up and do it yourself.