如何忽略Web Essentials LESS编译中的某些LESS文件? (Bootstrap) [英] How to ignore certain LESS files in Web Essentials LESS compiling? (Bootstrap)

查看:462
本文介绍了如何忽略Web Essentials LESS编译中的某些LESS文件? (Bootstrap)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我设置了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文件一遍又一遍不同的名称。

I've set up Web Essentials 2013 (in Visual Studio 2012) and loaded in the default Twitter Bootstrap LESS source files. Auto-build and minification is working perfectly, except Web Essentials quite overdoes the job. When I select "bootstrap.less", make a change and save it, Web Essentials creates a new "bootstrap.css" as well as a "bootstrap.min.css" with everything inside I need. But when I edit e.g. buttons.less, it creates a buttons.css (and buttons.min.css) too (with all the includes and mixins). Which means, in fact, I'll have nearly the same css files over and over again under different names.

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

Can I declare certain files to be ignored on save?

推荐答案

好吧,我想出来了。

我最初想要的是LESS编译,Web Essentials是这样做的节省。要停用此功能,在Visual Studio 2012中,转到工具 - >选项 - > Web Essentials - > LESS并停用保存时生成CSS文件。

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".

根据 Web Essentials的Visual Studio扩展页面,构建时的缩小不是现在,而是将来的发布。我必须自己删除.min.css文件,并在每个版本上再次创建它似乎。 :

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. :(

如果您使用任何框架,工具,扩展等和你的新的超级权力不能按预期工作,不要责怪扩展,闭嘴和自己做。

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.

这篇关于如何忽略Web Essentials LESS编译中的某些LESS文件? (Bootstrap)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆