简体   繁体   English

自定义gulp-jshint报告程序不适用于gulp-shell

[英]Custom gulp-jshint reporter not working with gulp-shell

The following reporter doesn't seem to work with gulp-shell . 以下记者似乎与gulp-shell无关。

...
var shell = require('gulp-shell');
...
var mReporter = {
    reporter: function (errors) {
        shell.task([
              'echo "echo hello"'
            ]);
        console.log("console.log hello");
    }
};
...

console.log hello is being displayed but echo hello is not? console.log hello正在显示,但echo hello不是吗?

Found a workaround. 找到了解决方法。

var shell = require('gulp-shell');
...
gulp.task('mTask', shell.task([
    'echo "echo hello"'
]));
...
var mReporter = {
    reporter: function (errors) {
        gulp.start('mTask');
        console.log("console.log hello");
    }
};
...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM