R
R
Rum2020-05-23 18:24:40
css
Rum, 2020-05-23 18:24:40

Why doesn't gulp.watch complete?

I start the watch , it starts working but does not end (

Gulpfile:

var gulp = require('gulp');
    rename = require('gulp-rename');
    sass = require('gulp-sass');
    watch = require('gulp-watch');

gulp.task('sass', function() {
  return gulp.src('www/scss/**/*.scss')
  .pipe(sass())
  .pipe(gulp.dest('css'))
});


gulp.task('watch', function() {
    gulp.watch('www/scss/**/*.scss', gulp.parallel('sass'));
});


package.json:

{
  "name": "www",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "",
  "license": "ISC",
  "devDependencies": {
    "gulp": "^4.0.2",
    "gulp-rename": "^2.0.0",
    "gulp-sass": "^4.1.0",
    "gulp-watch": "^5.0.1"
  }
}

5ec94021ded19898300079.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2020-05-23
Bun @Melone_from_Squadra

This is the focus. Watch tasks do not end, they execute the tasks listed in the second argument when changing watch files.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question