вначале все работает как надо, а потом перестает и выдает такую ошибку. Did you forget to signal async completion? что делать?
import gulpSass from "gulp-sass";
import nodeSass from "node-sass";
const scss = gulpSass(nodeSass);
import {src, dest, watch, parallel, series} from 'gulp';
import concat from'gulp-concat';
import autoprefixer from 'gulp-autoprefixer';
import uglify from'gulp-uglify';
import {deleteAsync} from 'del';
import imagemin, {gifsicle, mozjpeg, optipng, svgo} from 'gulp-imagemin';
import sync from 'browser-sync';
const browserSync = sync.create();
function browsersync(){
browserSync.init({
server: {
baseDir: "app/"
},
notify: false
});
}
function styles(){
return src('app/scss/style.scss')
.pipe(scss({outputStyle:'compressed'}))
.pipe(concat('style.min.css'))
.pipe(autoprefixer({
overrideBrowserslist: ['last 10 versions'],
grid: true
}))
.pipe(dest('app/css'))
.pipe(browserSync.stream())
}
function scripts(){
return src([
'node_modules/jquery/dist/jquery.js',
'app/js/main.js'
])
.pipe(concat('main.min.js'))
.pipe(uglify())
.pipe(dest('app/js'))
.pipe(browserSync.stream())
}
function images(){
return src('app/images/**/*.*')
.pipe(imagemin([
gifsicle({interlaced: true}),
mozjpeg({quality: 75, progressive: true}),
optipng({optimizationLevel: 5}),
svgo({
plugins: [
{
name: 'removeViewBox',
active: true
},
{
name: 'cleanupIDs',
active: false
}
]
})
]))
.pipe(dest('dist/images'))
}
function build(){
return src([
'app/**/*.html',
'app/css/style.min.css',
'app/js/main.min.js'
], {base: 'app'})
.pipe(dest('dist'))
}
function cleanDist(){
return deleteAsync(['dist']);;
}
function watching(){
watch(['app/scss/**/*.scss'],styles);
watch(['app/js/**/*.js', '!app/js/main.min.js'], scripts);
watch(['app/**/*.html']).on('change', browserSync.reload)
}
export const stylesmin = styles;
export const scriptsmin = scripts;
export const browsersyncrun = browsersync;
export const watchingrun = watching;
export const imagesmin = images;
export const cleandist = cleanDist;
export const buildrun = series(cleanDist, images, build);
export default parallel(styles, scripts, browsersync, watching);