Gulp Watch is not working

后端 未结 3 579
北恋
北恋 2021-02-14 14:28

I\'m new Gulp user, and I try simple script to watch compass, but it didn\'t work. But when I just run gulp compass gulp can compile it. Any ideas? Here my script:<

3条回答
  •  甜味超标
    2021-02-14 14:40

    You've neglected to actually call the "watch" task, which is not the same thing as gulp.watch. Your default gulp task should instead look like:

    gulp.task('default', function() {
        gulp.start('compass');
        gulp.start('watch');
    });
    

    but it should really just look like:

    gulp.task('default', ['compass', 'watch']);
    

提交回复
热议问题