首页 > Task 'jspath' is not in your gulpfile 这个怎么解决

Task 'jspath' is not in your gulpfile 这个怎么解决

在改变js文件里面的代码时,gulp刷新的时候会报这个错。这个js配置怎么改


看你的gulpfile.js 这一行有问题 gulp.start("jspath"); 正确的如下

gulp.task('watch', function() {

    gwatch(paths.htmlpunit,function(file){
      watchcl(file);
      gulp.start("html");
    });
    gwatch(paths.csspath,function(file){
        watchcl(file);
        gulp.start("css");
    });
    gwatch(paths.jspath,function(file){
        watchcl(file);
        // gulp.start("jspath"); //这一行有问题,你压根没有这个task,应该改为如下 
        gulp.start("js");
    });
});

【热门文章】
【热门文章】