我无法与gulp-bless一起使用gulp-sourcemaps。只要包含了sorucemaps,Gulp-bless就会冻结在手表上。他们每个人都很好。有人有类似的问题吗?
gulp.task('sass', function () {
return gulp.src('./css/**/*.scss')
.pipe(plumber())
.pipe(sourcemaps.init({ loadMaps: true }))
.pipe(sass({
outputStyle: 'compressed'
}).on('error', function(error) {
this.emit('end');
notify({
title: "SASS ERROR",
message: "line " + error.line + " in " + error.file.replace(/^.*[\\\/]/, '') + "\n" + error.message
}).write(error);
}))
.pipe(autoprefixer({ browsers: ['last 3 versions'] }))
.pipe(sourcemaps.write())
.pipe(gulp.dest('./css/'));
});
gulp.task('splitCss', function() {
return gulp.src('./css/style.css')
.pipe(bless())
.pipe(gulp.dest('./css/ie'));
});
gulp.task('watch', function () {
gulp.watch('./css/**/*.scss', ['sass']);
gulp.watch('./css/style.css', ['splitCss']);
}