我有一个较少编译的 grunt 任务,其中 grunt 安装文件夹中较少文件的相对路径是raw/less/source_map/
这是咕噜声文件。
Gruntfile:(编辑:更改为@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 任务,没有任何选项。谁能指出这有什么问题。