Visual studio - precompile - dotless

后端 未结 7 1599
萌比男神i
萌比男神i 2020-12-13 04:48

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

The site gives me a dotless.compiler.exe

相关标签:
7条回答
  • 2020-12-13 05:52

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

    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
    

    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.

    0 讨论(0)
提交回复
热议问题