From b95016560849c206c0a45f373b7d5ca60a76d057 Mon Sep 17 00:00:00 2001 From: Dan Allen Date: Fri, 25 Jun 2021 03:17:38 -0600 Subject: [PATCH] don't uglify .min.js files in js/vendor folder --- gulp.d/tasks/build.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gulp.d/tasks/build.js b/gulp.d/tasks/build.js index 6f213e2..06e25c8 100644 --- a/gulp.d/tasks/build.js +++ b/gulp.d/tasks/build.js @@ -63,7 +63,7 @@ module.exports = (src, dest, preview) => () => { // NOTE concat already uses stat from newest combined file .pipe(concat('js/site.js')), vfs - .src('js/vendor/*.js', { ...opts, read: false }) + .src('js/vendor/*([^.])?(.bundle).js', { ...opts, read: false }) .pipe( // see https://gulpjs.org/recipes/browserify-multiple-destination.html map((file, enc, next) => { @@ -94,6 +94,9 @@ module.exports = (src, dest, preview) => () => { ) .pipe(buffer()) .pipe(uglify()), + vfs + .src('js/vendor/*.min.js', opts) + .pipe(map((file, enc, next) => next(null, Object.assign(file, { extname: '' }, { extname: '.js' })))), // NOTE use this statement to bundle a JavaScript library that cannot be browserified, like jQuery //vfs.src(require.resolve(''), opts).pipe(concat('js/vendor/.js')), vfs -- 2.11.0