我正在尝试让grunt contrib- less为我编译一个更少的文件。我有以下gruntfile:
less: {
files: {
"httpdocs/static/assets/css/result.css": "httpdocs/static/assets/css/dashboard.less"
}
},路径绝对是正确的,我已经三次检查了这些文件是否存在,但是,当我运行grunt时,我得到了以下消息:
Running "less:files" (less) task
>> Destination not written because no source files were provided.我在gruntfile中遗漏了什么,才能让它正确编译less文件?我抓狂了,因为我知道这可能是很简单的事情,但我搞不懂。
发布于 2013-07-18 07:59:22
您的less配置不起作用,因为您需要将其放入less中的特定target中。例如
less: {
yourTarget : {
files: {
"httpdocs/static/assets/css/result.css": "httpdocs/static/assets/css/dashboard.less"
}
}
},并使用以下命令运行
grunt less:yourTarget
您可以随心所欲地命名target,但是因为less是一个多任务,所以它需要至少有一个目标。
https://stackoverflow.com/questions/17712214
复制相似问题