Answer the question
In order to leave comments, you need to log in
How to reconfigure task gulp-ruby-sass to gulp-sass?
Hello, please help me to correctly reconfigure the task that was written under gulp-ruby-sass and now you need to use gulp-sass :
gulp.task('sass', function() {
var processors = [
autoprefixer({browsers: ['last 10 versions'], cascade: false}),
mqpacker({
sort: function (a, b) {
a = a.replace(/\D/g,'');
b = b.replace(/\D/g,'');
return b-a;
// replace this with a-b for Mobile First approach
}
})
];
return sass(config.src.sass+'*.sass', {
sourcemap: true,
style: 'compact',
emitCompileError: true
})
.on('error', notify.onError({
title: 'Sass Error!',
message: '<%= error.message %>'
}))
.pipe(postcss(processors))
.pipe(sourcemaps.write('./'))
.pipe(gulp.dest(config.dest.css));
});
Answer the question
In order to leave comments, you need to log in
gulp.task('sass', function() {
var processors = [
autoprefixer({browsers: ['last 10 versions'], cascade: false}),
mqpacker({
sort: function (a, b) {
a = a.replace(/\D/g,'');
b = b.replace(/\D/g,'');
return b-a;
// replace this with a-b for Mobile First approach
}
})
];
gulp.src(config.src.sass+'*.sass')
.pipe(sass({outputStyle: 'compact', sourcemap: true}).on('error', notify.onError({
title: 'Sass Error!',
message: '<%= error.message %>'
})))
.pipe(postcss(processors))
.pipe(sourcemaps.write('./'))
.pipe(gulp.dest(config.dest.css));
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question