ARTICLE AD BOX
in my first post, I was building gulp, but something happened that I didn't understand:
This is a bug :
[21:36:37] Using gulpfile I:\20250820\mvc\gulpfile.js
[21:36:37] Starting 'build'...
[21:36:37] Starting 'copy-html'...
[21:36:37] Finished 'copy-html' after 16 ms
[21:36:37] Starting 'copy-css'...
[21:36:38] The following tasks did not complete: build, copy-css
Did you forget to signal async completion?
This is my code. Please help me, everyone. Thank you all.
const gulp = require('gulp'); const babel = require("gulp-babel"); const watch = require('gulp-watch'); const browserSync = require('browser-sync').create(); const environments = require('gulp-environments'); const uglifycss = require('gulp-uglifycss'); const terser = require('gulp-terser'); const postcss = require('gulp-postcss'); const purgecss = require('gulp-purgecss'); const production = environments.production; gulp.task('watch', function () { browserSync.init({ proxy: 'localhost:8080', }); gulp.watch('src/main/resources/**/*.html', gulp.series('copy-html-and-reload')); gulp.watch('src/main/resources/**/*.css', gulp.series('copy-css-and-reload')); gulp.watch('src/main/resources/**/*.js', gulp.series('copy-js-and-reload')); }); gulp.task('copy-html', function () { return gulp.src('src/main/resources/**/*.html') .pipe(gulp.dest('target/classes/')); }); gulp.task('copy-css', function () { return gulp.src('src/main/resources/**/*.css') .pipe(postcss()) .pipe(production(uglifycss())) .pipe(gulp.dest('target/classes/')); }); gulp.task('copy-js', function () { return gulp.src('src/main/resources/**/*.js') .pipe(babel()) .pipe(production(terser())) .pipe(gulp.dest('target/classes/')); }); gulp.task('copy-html-and-reload', gulp.series('copy-html', reload)); gulp.task('copy-css-and-reload', gulp.series('copy-css', reload)); gulp.task('copy-js-and-reload', gulp.series('copy-js', reload)); gulp.task('build', gulp.series('copy-html', 'copy-css', 'copy-js')); gulp.task('default', gulp.series('watch')); function reload(done) { browserSync.reload(); done(); }