我有以下gruntfile.js代码:
less: {
development: {
files: [{
expand: true,
cwd: 'assets/less',
src: ['*.less'],
dest: 'wwwroot/content/css/',
ext: '.css'
}]
}
},
watch: {
less: {
files: ["assets/less/*.less"],
task: ["less:development"]
}
};
grunt.loadNpmTasks("grunt-contrib-less");
grunt.loadNpmTasks("grunt-contrib-watch");
当我运行监视任务并对我的任何较少文件进行更改时,它检测到较少文件中的更改:
文件“assets \ less \ abc.less”已更改。
但问题是它没有更新我的abc.css文件。有谁知道为什么这个以及如何解决它?感谢
答案 0 :(得分:3)
嘿......这个问题刚刚another question,问题就是这样:
watch: {
less: {
files: ["assets/less/*.less"],
tasks: ["less:development"] // <-- note that this is PLURAL! :)
}
}