From 3a95c168e6604aa65cf3c2361a022b3cfe75d675 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Thu, 13 May 2021 20:54:11 +0200 Subject: [PATCH] [ticket/16746] Adjust gulpfile for compatibility with gulp 4 PHPBB3-16746 --- gulpfile.js | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 5fff688e1d..08bca5dd18 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -19,8 +19,8 @@ const build = { css: './phpBB/styles/prosilver/theme/', }; -gulp.task('css', () => { - const css = gulp +gulp.task('css', gulp.series(() => { + return gulp .src(build.css + '*.css') .pipe(autoprefixer()) .pipe( @@ -29,16 +29,14 @@ gulp.task('css', () => { ]), ) .pipe(gulp.dest(build.css)); +})); - return css; -}); - -gulp.task('clean', () => { +gulp.task('clean', gulp.series(() => { del([ 'dist' ]); -}); +})); -gulp.task('minify', () => { - const css = gulp +gulp.task('minify', gulp.series(() => { + return gulp .src(build.css + '/bidi.css') .pipe(sourcemaps.init()) .pipe( @@ -53,12 +51,10 @@ gulp.task('minify', () => { })) .pipe(sourcemaps.write('./')) .pipe(gulp.dest(build.css)); +})); - return css; -}); +gulp.task('watch', gulp.series(() => { + gulp.watch('phpBB/styles/prosilver/theme/*.css', gulp.series('css')); +})); -gulp.task('watch', () => { - gulp.watch('phpBB/styles/prosilver/theme/*.css', [ 'css' ]); -}); - -gulp.task('default', [ 'css', 'watch' ]); +gulp.task('default', gulp.series('css', 'watch'));