A
A
akselian2020-01-15 12:02:07
JavaScript
akselian, 2020-01-15 12:02:07

Why can't gulp find the task?

5e1ed4dd37d91703061345.png

var gulp = require('gulp');
var sass = require('gulp-sass');
var browserSync = require('browser-sync');


gulp.task('sass', function(){
  return gulp.src('src/scss/**/*.scss')
    .pipe(sass()) // Конвертируем Sass в CSS с помощью gulp-sass
    .pipe(gulp.dest('dist/css')
    .pipe(browserSync.reload({
        stream: true
    })))
});

gulp.task('watch', ['browserSync'], function (){
    gulp.watch('app/scss/**/*.scss', ['sass']); 
    gulp.watch('src/*.html', browserSync.reload);
    gulp.watch('src/js/**/*.js', browserSync.reload);
  })

gulp.task('browserSync', function() {
  browserSync({
    server: {
      baseDir: 'src'
    },
  })
})

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vyach Gor, 2020-01-15
@akselian

Here is a detailed video of what has changed in the syntax and how to fix it - link

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question