Upon running the command 'gulp' in gitbash, an error is being displayed for the last line of the code, stating: throw new Error('Task requires a name that is a string');
Error: Task requires a name that is a string
"use strict";
var gulp = require('gulp');
var connect = require('gulp-connect'); // Runs a local dev server
var open = require('gulp-open'); // Open a URL in a web browser
var config = {
port: 9005,
devBaseUrl: 'http://localhost',
paths: {
html: './src/*.html',
dist: './dist'
}
};
gulp.task(connect, function(){
connect.server({
root: '[dist]',
port: config.port,
base: config.devBaseUrl,
livereload: true
});
});
gulp.task(open,['connect'], function(){
gulp.src('dist/index.html')
.pipe(open({ url:config.devBaseUrl + ':' + config.port + '/'}));
});
gulp.task(html,function(){
gulp.src(config.paths.html)
.pipe(gulp.src(config.paths.dist))
.pipe(connect.reload());
});
gulp.task('watch', function(){
gulp.watch(config.paths.html, ['html']);
});
gulp.task('default', ['html', 'open', 'watch']);