简体   繁体   English

无点使用其他文件夹

[英]Dotless using different folder

I have DotLess 1.4.1 installed (Asp.Net 4.0). 我已经安装了DotLess 1.4.1(Asp.Net 4.0)。

My less directory structure is: 我较少的目录结构是:

/assets/styles/*.less

I'm now looking at bootstrap and although I'll probably change the default directory structure, bootstrap will be inside its own folder. 我现在正在查看引导程序,尽管我可能会更改默认目录结构,但引导程序将位于其自己的文件夹中。 At the moment it is located: 目前位于:

/content/bootstrap/*.less

I've tried 我试过了

@import "grid.less"
@import "/content/bootstrap/grid.less"
@import "../../content/bootstrap/grid.less
@import "./../../content/bootstrap/grid.less

Amongst many other variations. 在许多其他变体中。

I have a build event like this: 我有一个这样的构建事件:

“$(SolutionDir)packages\dotless.1.4.1.0\tool\dotless.Compiler.exe” "$(ProjectDir)assets\styles\main.less” “$(ProjectDir)assets\styles\main.css”

Anyone experienced this kind of issue or have an idea as to how it can be solved? 是否有人遇到过此类问题或对如何解决有想法?

Your problem is that dotless uses the current directory to look for imports even when the initial file is not in the current directory. 您的问题是,即使初始文件不在当前目录中dotless也会使用当前目录来查找导入 If you're comfortable working with MSBuild files, you can switch the working directory for the exe call. 如果您习惯使用MSBuild文件,则可以切换 exe调用的工作目录

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM