Здравствуйте, подскажите, в чем ошибка?
Вот код gulp файла:
let preprocessor = 'sass';
const {app, dest, parallel, watch} = require('gulp'),
browserSync = require('browser-sync').create(),
concat = require('gulp-concat'),
uglify = require('gulp-uglify-es').default(),
sass = require('gulp-sass'),
autoprefixer = require('gulp-autoprefixer'),
cleancss = require('gulp-clean-css'),
imagemin = require('gulp-imagemin'),
newer = require('gulp-newer'),
del = require('del');
function browsersync() {
browserSync.init({
server: {'baseDir': 'src/'},
notify: false,
online: true
});
}
function scripts() {
return app([
'src/js/script.js'
])
.pipe(concat('script.min.js'))
.pipe(uglify())
.pipe(dest('src/js/'))
.pipe(browserSync.stream());
}
function startwatch() {
watch(['src/**/*.js', '!src/**/*.min.js'], scripts);
watch('src/**/' + preprocessor + '/**/*', styles);
watch('src/**/*.html').on('change', browserSync.reload);
watch('src/images/**/*', images);
}
function styles() {
return app('src/' + preprocessor + '/style.' + preprocessor + '')
.pipe(eval(preprocessor)())
.pipe(concat('style.min.css'))
.pipe(autoprefixer({ overrideBrowserslist: ['last 10 versions'], grid: true }))
.pipe(cleancss( { level: { 1: { specialComments: 0 } }} ))
.pipe(dest('src/css/'))
.pipe(browserSync.stream());
}
function images() {
return app('src/images/**/*')
.pipe(newer('src/images'))
.pipe(imagemin())
.pipe(dest('src/images'));
}
function cleanimg() {
return del('src/images/**/*', { force: true });
}
exports.browsersync = browsersync;
exports.scripts = scripts;
exports.styles = styles;
exports.images = images;
exports.cleanimg = cleanimg;
exports.default = parallel(styles, scripts, browsersync, startwatch);
Ошибка вот: