视觉工作室 - precompile - 带点 [英] Visual studio - precompile - dotless

查看:130
本文介绍了视觉工作室 - precompile - 带点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不知道是否有一种方法precompile *。少文件(的 http://www.dotlesscss.org/ )与Visual Studio。

I wonder if there is a way to precompile *.less files(http://www.dotlesscss.org/) with visual studio.

该网站给了我一个 dotless.compiler.exe ,但我不知道如何挂钩这件事到Visual Studio。我找了两个WebForms和ASP.NET MVC的解决方案。

The site gives me a dotless.compiler.exe but I am not sure how to hook this up to visual studio. I am looking for a solution for both Webforms and ASP.NET MVC.

推荐答案

根据您的编译环境,你可以揭开序幕 dotless.Compiler.exe 作为构建任务。

Depending on your build environment, you can kick off dotless.Compiler.exe as a build task.

例如,在Visual Studio(所有1号线),使用pre-生成任务:

For example, using a Pre-Build task in Visual Studio (all 1 line):

$(SolutionDir)Tools\dotLess\dotless.compiler.exe -m 
    $(ProjectDir)content\css\site.less $(ProjectDir)content\css\site.css

宏( $(SolutionDir)等),让一点点灵活性项目和文件的位置。而不是使用标准的 .LESS 文件,只需引用新的的.css 文件您的标记。

The macros ($(SolutionDir), etc) allow a bit of flexibility to project and file locations. Rather than using the standard .less files, simply reference the new .css files in your markup.

这篇关于视觉工作室 - precompile - 带点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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