Answer the question
In order to leave comments, you need to log in
How to edit a Gulp task so that .map files are saved correctly?
Previously, the config saved .map in the body of the files - now there is a need to store them separately.
Changed the config to this:
// SASS/SCSS
// ===========================================
gulp.task('sass:build', function () {
return gulp.src(path.build.sass)
.pipe(sourcemaps.init())
.pipe(sass().on("error", notify.onError()))
.pipe(autoprefixer(['last 20 versions', '> 1%', 'ie > 8']))
.pipe(rename(function (path) {
path.extname = ".css"
}))
.pipe(sourcemaps.write('/maps'))
.pipe(gulp.dest(path.build.cssPath))
.pipe(cleanCSS())
.pipe(sourcemaps.write('/maps'))
.pipe(rename(function (path) {
path.extname = ".min.css"
}))
.pipe(gulp.dest(path.build.cssPath))
.pipe(reload({stream: true}));
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question