Answer the question
In order to leave comments, you need to log in
Why can't gulp find the task?
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
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question