gulp.task('scss', function () {
return gulp.src('app/scss/main.scss')
.pipe(scss()).on('error', notify.onError())
.pipe(autoprefixer({
browsers: ['last 15 versions'],
cascade: false
}))
.pipe(gulp.dest('app/css'))
.pipe(browserSync.stream());
});
gulp.task('csscomb', ['scss'], function () {
return gulp.src('app/css/main.css')
.pipe(csscomb('configs/yandex.json'))
.pipe(gulp.dest('app/css'));
});
gulp.task('cssnano', ['csscomb'], function () {
return gulp.src('app/css/main.css')
.pipe(cssnano())
.pipe(rename({suffix: '.min'}))
.pipe(gulp.dest('dist/css'));
});
gulp.task('build', gulpSequence('clean', ['cssnano', 'scripts', 'useref', 'img']));