Task calling:

gulp.task('dev:build', () => { gulp.parallel('dev:html', 'dev:css', 'dev:js'); }); 

Tasks performed by:

 gulp.task('dev:html', () => { gulp.src(`${PATHS.source}/**/*.html`, { since: gulp.lastRun('dev:html') }) .pipe(newer(PATHS.build)) .pipe(htmlhint()) .pipe(htmlhint.reporter()) .pipe(htmlhint.failOnError()) .pipe(debug({ title: 'HTML Built' })) .pipe(gulp.dest(PATHS.build)); }); gulp.task('dev:css', () => { gulp.src(`${PATHS.source}/scss/*.*`, { since: gulp.lastRun('dev:css') }) .pipe(newer(PATHS.build)) .pipe(sourcemaps.init()) .pipe(sass().on('error', notifier.onError({ message: '<%= error.message %>', title: 'SASS Error', sound: 'frog', }))) .pipe(debug({ title: 'CSS Compiled' })) .pipe(sourcemaps.write()) .pipe(gulp.dest(`${PATHS.build}/css`)); }); gulp.task('dev:js', () => { gulp.src(`${PATHS.source}/js/*.js`) .pipe(jsEslint()) .pipe(jsEslint.format()) .pipe(jsEslint.failAfterError()) .on('error', notifier.onError({ title: 'JS Linting Fail', message: '<%= error.message %>', })) .pipe(jsPolyfills('polyfills.js', { browsers: '> 1%', })) .pipe(gulp.dest(`${PATHS.build}/js`)); }); 

The result of the implementation:

 [12:25:54] The following tasks did not complete: dev:build [12:25:54] Did you forget to signal async completion? 

What can be done with this? How to fix?

  • Try return gulp.src... - Bleser
  • Incredibly, it also helped: gulp.task('dev:build', gulp:series( gulp.parallel('dev:html', 'dev:css', 'dev:js') )); - Albert Akmukhametow

1 answer 1

I was able to do everything on my own almost independently.

1) Before each gulp.src.. insert return . It turned out return gulp.src (thanks to comrade bleser )

2) Modified the ad, and instead of Function Expression I declare gulp.series , inside which I already declare gulp.parallel :

 gulp.task('dev:build', gulp:series( gulp.parallel('dev:html', 'dev:css', 'dev:js') ));