From fa17f63b82dcb4c57251c7b9024b868edcbd7d81 Mon Sep 17 00:00:00 2001 From: Oliver Booth Date: Thu, 10 Aug 2023 14:34:01 +0100 Subject: [PATCH] chore: build ts / bundle js in series --- Gulpfile.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Gulpfile.js b/Gulpfile.js index f1901dd..d36925d 100644 --- a/Gulpfile.js +++ b/Gulpfile.js @@ -18,11 +18,13 @@ function compileSCSS() { } function compileTS() { - gulp.src(`${srcDir}/ts/**/*.ts`) + return gulp.src(`${srcDir}/ts/**/*.ts`) .pipe(ts("tsconfig.json")) .pipe(terser()) .pipe(gulp.dest(`tmp/js`)); +} +function bundleJS() { return gulp.src('tmp/js/*.js') .pipe(webpack({ mode: 'production', output: { filename: 'app.min.js' } })) .pipe(gulp.dest(`${destDir}/js`)); @@ -46,4 +48,4 @@ function copyImages() { } exports.default = compileSCSS; -exports.default = gulp.parallel(compileSCSS, compileTS, copyCSS, copyJS, copyImages); +exports.default = gulp.parallel(compileSCSS, gulp.series(compileTS, bundleJS), copyCSS, copyJS, copyImages);