Answer the question
In order to leave comments, you need to log in
Why does gulp watch run indefinitely?
Hello.
var gulp = require('gulp'),
cssmin = require('gulp-cssmin'), // минификация css
rename = require("gulp-rename"), // переименовать файл
watch = require('gulp-watch'), // слежка
notify = require("gulp-notify"); // уведомление
gulp.task('default', function() {
gulp.src(['../styles/style.css','../styles/respons.css'])
.pipe(cssmin())
.pipe(rename({suffix: '.min'}))
.pipe(gulp.dest('../styles'))
.pipe(notify("Found file: <%= file.relative %>!"));
});
gulp.task('watch', function (){
gulp.watch('../styles/*.css',['default'])
});
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