diff --git a/gulpfile.js b/gulpfile.js index 0af23c2bf..f6ac05058 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -18,7 +18,7 @@ const paths = { const javascripts = () => { // Files that don't use NotifyModules and can be uglified - const local = src([ + const localUglified = src([ paths.src + 'javascripts/modules/init.js', paths.src + 'javascripts/modules/uswds-modules.js', paths.src + 'javascripts/modules/show-hide-content.js', @@ -33,6 +33,13 @@ const javascripts = () => { paths.src + 'javascripts/validation.js', paths.src + 'javascripts/scrollPosition.js', ]) + .pipe(plugins.prettyerror()) + .pipe( + plugins.babel({ + presets: ['@babel/preset-env'], + }) + ) + .pipe(plugins.uglify()); // Files that use NotifyModules - split into two groups to avoid stream issues const notifyModules1 = src([ @@ -54,6 +61,7 @@ const javascripts = () => { paths.src + 'javascripts/collapsibleCheckboxes.js', paths.src + 'javascripts/radioSlider.js', paths.src + 'javascripts/updateStatus.js', + paths.src + 'javascripts/timeoutPopup.js', paths.src + 'javascripts/main.js', ]) .pipe(plugins.prettyerror()) @@ -63,15 +71,6 @@ const javascripts = () => { }) ); - // Apply uglify only to local files - const localUglified = local - .pipe( - plugins.babel({ - presets: ['@babel/preset-env'], - }) - ) - .pipe(plugins.uglify()); - // First create vendored with jquery-expose immediately after jQuery const vendoredWithExpose = src([ paths.npm + 'jquery/dist/jquery.min.js',