Answer the question
In order to leave comments, you need to log in
How to use gulp-watch with gulp-autoprefixer?
Everything works in this code, except for the autoprefixer, no errors and notes are displayed in the console:
var gulp = require('gulp');
var watch = require('gulp-watch');
var sass = require('gulp-sass'); // переводит SASS в CSS
var autoprefixer = require('gulp-autoprefixer'); // Проставлет вендорные префиксы в CSS
var cssnano = require('gulp-cssnano'); // Минимизация CSS
gulp.task('sass', function () {
return watch(['src/sass/*.+(sass|scss|css)'], { ignoreInitial: false })
.pipe(sass())
.pipe(autoprefixer({
browsers: ['last 25 versions'],
cascade: false
}))
.pipe(cssnano())
.pipe(gulp.dest("dist/css/"));
});
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