无法想象如何嵌套grunt 手表和手写笔编译器(livereload将在以后出现)
我也试过使用"new"grunt newer,但我的代码肯定有问题.
有什么建议吗?
grunt.initConfig({
stylus: {
compile: {
options: {
paths: ['stylus'],
import: [
'nib/*'
]
},
files: {
'css/style.css': 'stylus/style.styl',
},
},
},
watch: {
stylus: {
files: ['*/*.*'],
task: ['newer:stylus:compile'],
options : { livereload: true },
},
},
});
grunt.loadNpmTasks('grunt-contrib-stylus');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-newer');
grunt.registerTask('compile', ['newer:stylus:all']);
Run Code Online (Sandbox Code Playgroud)
此外,如果我跑grunt watch,它运作良好,但什么都不做.并且,如果我运行grunt stylus,它完全编译我的CSS.