U
U
ummahusla2016-09-08 15:19:02
gulp.js
ummahusla, 2016-09-08 15:19:02

Bug in gulpfile and Browser Sync?

BG1337:gulp-test ed$ gulp browserSync
[13:11:36] Using gulpfile /Library/WebServer/Documents/Websites/gulp-starting-template/gulpfile.js
[13:11:36] Task 'browserSync' is not in your gulpfile

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

gulp.task('browser-sync', function() {
    browserSync.init({
        server: {
            baseDir: "app"
        }
    });
});

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

1 answer(s)
A
Alexander Zolotykh, 2016-09-08
@zolotykh

gulp.task('browser-sync' -> gulp.task('browserSync'

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question