Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/spring-mvc/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
自定义gulp jshint reporter不使用gulp shell_Gulp - Fatal编程技术网

自定义gulp jshint reporter不使用gulp shell

自定义gulp jshint reporter不使用gulp shell,gulp,Gulp,下面的报告程序似乎不适用于gulpshell ... var shell = require('gulp-shell'); ... var mReporter = { reporter: function (errors) { shell.task([ 'echo "echo hello"' ]); console.log("console.log hello"); } }; ... 正在显示c

下面的报告程序似乎不适用于
gulpshell

...
var shell = require('gulp-shell');
...
var mReporter = {
    reporter: function (errors) {
        shell.task([
              'echo "echo hello"'
            ]);
        console.log("console.log hello");
    }
};
...
正在显示
console.log hello
,但未显示
echo hello

找到解决方法

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");
    }
};
...