我尝试使用 gulp-load-plugins 但出现错误。
例如我尝试以下
var istanbul = require('gulp-istanbul');
var $ = require('gulp-load-plugins')({lazy: true});
gulp.task('run', function () {
return gulp.src(config.files)
.pipe($.istanbul(
{
instrumenter: isparta.Instrumenter
}
))
.pipe(istanbul.hookRequire());
});
当我删除 var istanbul = require('gulp-istanbul'); 我收到错误 ReferenceError: istanbul is not defined
"devDependencies": {
"chai": "3.5.0",
"gulp": "^3.9.1",
"gulp-copy": "0.0.2",
"gulp-exec": "^2.1.2",
"gulp-istanbul": "^1.0.0",
"gulp-load-plugins": "^1.2.4",
"gulp-util": "^3.0.7",
"istanbul": "0.4.4",
"mocha": "2.2.5",
...
}
知道我在这里想念什么吗?