chore: build ts / bundle js in series
This commit is contained in:
parent
fb6eabf55f
commit
fa17f63b82
@ -18,11 +18,13 @@ function compileSCSS() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function compileTS() {
|
function compileTS() {
|
||||||
gulp.src(`${srcDir}/ts/**/*.ts`)
|
return gulp.src(`${srcDir}/ts/**/*.ts`)
|
||||||
.pipe(ts("tsconfig.json"))
|
.pipe(ts("tsconfig.json"))
|
||||||
.pipe(terser())
|
.pipe(terser())
|
||||||
.pipe(gulp.dest(`tmp/js`));
|
.pipe(gulp.dest(`tmp/js`));
|
||||||
|
}
|
||||||
|
|
||||||
|
function bundleJS() {
|
||||||
return gulp.src('tmp/js/*.js')
|
return gulp.src('tmp/js/*.js')
|
||||||
.pipe(webpack({ mode: 'production', output: { filename: 'app.min.js' } }))
|
.pipe(webpack({ mode: 'production', output: { filename: 'app.min.js' } }))
|
||||||
.pipe(gulp.dest(`${destDir}/js`));
|
.pipe(gulp.dest(`${destDir}/js`));
|
||||||
@ -46,4 +48,4 @@ function copyImages() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
exports.default = compileSCSS;
|
exports.default = compileSCSS;
|
||||||
exports.default = gulp.parallel(compileSCSS, compileTS, copyCSS, copyJS, copyImages);
|
exports.default = gulp.parallel(compileSCSS, gulp.series(compileTS, bundleJS), copyCSS, copyJS, copyImages);
|
||||||
|
Loading…
Reference in New Issue
Block a user