var gulp = require('gulp');
var browserSync = require('browser-sync').create();
gulp.task('server', function(){
browserSync.init({
server: {
baseDir: "./app/"
}
});
gulp.watch('./app/index.html').on('change', browserSync.reload);
});
gulp.task('default', ['server']);
ошибки в консоле:
$ gulp
assert.js:374
throw err;
^
AssertionError [ERR_ASSERTION]: Task function must be specified
at Gulp.set [as _setTask] (C:\Users\Bunny\Desktop\hotel\node_modules\undertaker\lib\set-task.js:10:3)
at Gulp.task (C:\Users\Bunny\Desktop\hotel\node_modules\undertaker\lib\task.js:13:8)
at Object.<anonymous> (C:\Users\Bunny\Desktop\hotel\gulpfile.js:17:6)
at Module._compile (internal/modules/cjs/loader.js:956:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:973:10)
at Module.load (internal/modules/cjs/loader.js:812:32)
at Function.Module._load (internal/modules/cjs/loader.js:724:14)
at Module.require (internal/modules/cjs/loader.js:849:19)
at require (internal/modules/cjs/helpers.js:74:18)
at execute (C:\Users\Bunny\AppData\Roaming\npm\node_modules\gulp-cli\lib\versioned\^4.0.0\index.js:36:18) {
generatedMessage: false,
code: 'ERR_ASSERTION',
actual: false,
expected: true,
operator: '=='
}