Answer the question
In order to leave comments, you need to log in
'browser Sync' is not in your gulpfile - what is the problem?
Correct the code please (to comply with js norms - brackets, etc...) thanks
"use strict";
var gulp = require('gulp'),
sass = require('gulp-sass'),
watch = require('gulp-watch'),
browserSync = require('browser-sync');
gulp.task('sass', function(){
return gulp.src('app/scss/**/*.scss')
.pipe(sass())
.pipe(gulp.dest('app/css/'))
.pipe(browserSync.reload({
stream: true
}))
});
gulp.task('watch', ['browserSync', 'sass'], function (){
gulp.watch('app/scss/**/*.scss', ['sass'])
});
Answer the question
In order to leave comments, you need to log in
gulp.task('browser-sync', function() { // Создаем таск browser-sync
browserSync({ // Выполняем browser Sync
server: { // Определяем параметры сервера
baseDir: 'app' // Директория для сервера - app
},
notify: false // Отключаем уведомления
});
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question