mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 04:23:55 +00:00
Merge branch 'dillon/122-1688-po-automation-project' into vapor/development
This commit is contained in:
Vendored
+18
-2
@@ -100,15 +100,31 @@ gulp.task('sourceCss', gulp.series('sourceImages', () => {
|
||||
gulp.task('sourceJs', () => {
|
||||
fancyLog('Compiling source JS dependencies');
|
||||
|
||||
return gulp.src(pkg.globs.sourceJs)
|
||||
const allFiles = gulp.src(pkg.globs.sourceJs)
|
||||
.pipe(plugins.plumber({ errorHandler: onError }))
|
||||
.pipe(plugins.print())
|
||||
.pipe(plugins.print());
|
||||
|
||||
// Stream for files that need to be concatenated
|
||||
const concatStream = allFiles
|
||||
.pipe(gulpIf(
|
||||
file => !pkg.globs.sourceJsKeepNames.includes(path.basename(file.path)),
|
||||
plugins.concat('site.js')
|
||||
))
|
||||
.pipe(plugins.uglifyEs())
|
||||
.pipe(gulp.dest(pkg.paths.build.js));
|
||||
|
||||
// Stream for files that should keep their own names
|
||||
const keepNamesStream = allFiles
|
||||
.pipe(gulpIf(
|
||||
file => pkg.globs.sourceJsKeepNames.includes(path.basename(file.path)),
|
||||
plugins.uglifyEs()
|
||||
))
|
||||
.pipe(gulpIf(
|
||||
file => pkg.globs.sourceJsKeepNames.includes(path.basename(file.path)),
|
||||
gulp.dest(pkg.paths.build.js)
|
||||
));
|
||||
|
||||
return merge(concatStream, keepNamesStream);
|
||||
});
|
||||
|
||||
gulp.task('sourceFonts', () => {
|
||||
|
||||
Reference in New Issue
Block a user