【发布时间】:2015-02-07 03:38:04
【问题描述】:
我有一个较少编译的 grunt 任务,其中 grunt 安装文件夹中较少文件的相对路径是 raw/less/source_map/
这里是 grunt 文件。
Gruntfile: (EDIT: 改成@Yogesh Khatri 的代码还是一样的问题)
module.exports = function(grunt) {
grunt.initConfig({
less: {
files: { "raw/less/source_map/style.css" : "raw/less/source_map/style.less" }
},
watch: {
js: {
files: ['raw/less/source_map/style.less'],
tasks: ['default'],
}
}
});
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.registerTask('default', ['less']);
};
运行时会显示命令行
^CMacPro:grunt sagiavinashvarma$ grunt watch
Running "watch" task
Waiting...
>> File "raw/less/source_map/style.less" changed.
Running "less:files" (less) task
Done, without errors.
Completed in 1.862s at Tue Dec 09 2014 15:03:37 GMT+0530 (IST) - Waiting...
但是没有 style.css 输出。我已经编写了最简单的 grunt 任务,没有任何选项。 谁能指出这有什么问题。
【问题讨论】:
标签: gruntjs grunt-contrib-less