我正在使用LESS作为我的主应用程序,还需要一个不属于主应用程序的单独CSS文件。我正在尝试为现有的grunt监视任务添加新的源和目标
less: {
development: {
options: {
paths: ["path/to/less", "// path/to/2nd.less??"],
yuicompress: true
},
files: {
"path/to/build.css": ["path/to/less"]
},
//other src destination here?
files: {
"path/to/2nd.css": ["path/to/2nd.less"]
}
}
}
},
watch: {
files: ["path/to/less", "path/to/2nd.less"],
tasks: ["less"]
}
答案 0 :(得分:0)
感谢@jgillich指点我的文档。解决方案:
less: {
development: {
options: {
paths: ["path/to/less"],
yuicompress: true
},
files: {
"path/to/build.css": ["path/to/less"]
},
}
},
2nd: {
options: {
// same as above but with new paths
}
}
},
watch: {
files: ["path/to/less", "path/to/2nd.less"],
tasks: ["less"]
}