Было так
gulp.task('live-server', function () {
browserSync.init({
server: {
baseDir: './dist',
directory: true
},
notify: false
});
gulp.watch('**/*', {
cwd: './dist/'
}, browserSync.reload);
});
gulp.task('mdb-go', function () {
gulp.start('live-server');
gulp.watch('scss/**/*.scss', ['css-compile']);
gulp.watch(['dist/css/*.css', '!dist/css/*.min.css'], ['css-minify']);
gulp.watch('js/**/*.js', ['js-build']);
gulp.watch(['dist/js/*.js', '!dist/js/*.min.js'], ['js-minify']);
gulp.watch('**/*', {
cwd: './img/'
}, ['img-compression']);
});
Переписал так
gulp.task('live-server', function () {
browserSync.init({
server: {
baseDir: './dist',
directory: true
},
notify: false
});
gulp.watch('**/*', {
cwd: './dist/'
}, browserSync.reload);
});
// Watch on everything
gulp.task('mdb-go', function () {
gulp.start('live-server');
gulp.watch('scss/**/*.scss', gulp.parallel('css-compile'));
gulp.watch(['dist/css/*.css', '!dist/css/*.min.css'], gulp.parallel('css-minify'));
gulp.watch('js/**/*.js', gulp.parallel('js-build'));
gulp.watch(['dist/js/*.js', '!dist/js/*.min.js'], gulp.parallel('js-minify'));
gulp.watch('**/*', {
cwd: './img/'
}, ['img-compression']);
});
Но ошибка осталась [14:12:41] Task never defined: default [14:12:41] To list available tasks, try running: gulp --tasks
gulp.task('default', ['mdb-go']);