【发布时间】:2014-06-02 07:41:40
【问题描述】:
我是新手。听起来很吸引人!
目标:
- 将少一个文件编译成多个 css 文件(对于基于主题的 css):
设置:
main.less 导入 variables.less(变量包含不同的颜色模式)
Folder structure
\main.less
\variables.less
\theme\christmass\variables.less
\theme\newyear\variables.less
我想为每个变量调用lesscss.less(包含不同的颜色)
lesscss main.less main.css
lesscss main.less main{theme}.css path={theme_christmaspad}/variables.less
lesscss main.less main{theme}.css path={theme_newyearpad}/variables.less
问题:
我似乎无法设置 Visual Studio 的预构建事件来编译 css!我怎样才能使这项工作?
这是错误信息:
Error 1 The command "lessc" exited with code 9009
【问题讨论】:
-
使用 Web Essentials 之类的插件可能会有更好的运气:vswebessentials.com/features/less
-
我现在用这个。但是没有为每个文件提供编译选项。也没有办法导入具有动态路径的文件。我使用了另一种解决方案来解决我的问题。我会发布它