我从gulp-concat和gulp-sass那里得到了TypeError: Object #<File> has no method 'isNull'
:
gulp.task('scripts', function() {
var dest = BUILD_DEST + 'scripts';
del(dest);
return gulp
.src( scripts ) // scripts = [].concat(VENDOR_LIBS, APP_FILES)
.pipe( plumber() )
.pipe( concat('script.js') ) // everything is fine when this line is removed
// Does the output file need to already exist?
.pipe( gulp.dest( dest ) );
});
gulp.task('styles', function() {
var dest = BUILD_DEST + 'styles';
del(dest);
return gulp
.src( STYLE_FILES ) // STYLE_FILES = APP_SRC+'styles/*.scss'
.pipe( plumber() )
.pipe( sass() )
.pipe(gulp.dest( dest ));
});
这是
由于不小心使用了旧版本的gulp(3.0.0
vs 3.8.10
),它与gulp-concat和gulp-sass不兼容。升级到版本 3.8.10
解决了此问题。