From b77fb6f962f128ea184f06995e802bc3cd782661 Mon Sep 17 00:00:00 2001 From: Dannon Baker Date: Thu, 6 Apr 2017 12:12:48 -0400 Subject: [PATCH] Prevent wiping out webpack bundles, fix scripts path exclusion. --- client/gulpfile.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/client/gulpfile.js b/client/gulpfile.js index ab64e4540eb..b6f395d063b 100644 --- a/client/gulpfile.js +++ b/client/gulpfile.js @@ -5,7 +5,7 @@ var del = require('del'); var paths = { scripts: ['galaxy/scripts/**/*.js', - 'galaxy/scripts/!apps/**/*.js' + '!galaxy/scripts/apps/**/*.js' ] }; @@ -19,9 +19,10 @@ gulp.task('scripts', ['clean'], function() { }); gulp.task('clean', function(){ - // This currently wipes out webpack bundles, too, but it'll keep us from - // shipping cruft. Need to add a whitelist. - return del(['../static/scripts/'], {force: true}); + //Wipe out all scripts that aren't handled by webpack + return del(['../static/scripts/**/*.js', + '!../static/scripts/bundled/**.*.js'], + {force: true}); }); gulp.task('default', ['scripts']);