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));
});
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));
});