From 759c40793f9d8f33c3ac9bbaa948a8d944b23075 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Tue, 5 Apr 2016 09:13:01 +1200 Subject: [PATCH] Always use uglify during build It makes very little difference between "npm run build" and "npm run build --development" (both under a second), since the gulp pipeline is smart enough to only uglify the new bits. Creating different dist files with "--development" is causing grief during pull requests, since most devs will add the changed files without reviewing them. It also means you can commit without stopping your "watch" npm task. --- gulpfile.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index aacaa0af6..750eb8f9a 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -226,7 +226,7 @@ gulp.task('bundle-lib', function bundleLib() { .pipe(source(bundleFileName)) .pipe(buffer()) .pipe(sourcemaps.init({ loadMaps: true })) - .pipe(gulpif(!isDev, uglify())) + .pipe(uglify()) .pipe(sourcemaps.write('./')) .pipe(gulp.dest(PATHS.ADMIN_JAVASCRIPT_DIST)); }); @@ -248,7 +248,7 @@ gulp.task('bundle-legacy', function bundleLeftAndMain() { .pipe(source(bundleFileName)) .pipe(buffer()) .pipe(sourcemaps.init({ loadMaps: true })) - .pipe(gulpif(!isDev, uglify())) + .pipe(uglify()) .pipe(sourcemaps.write('./')) .pipe(gulp.dest(PATHS.ADMIN_JAVASCRIPT_DIST)); }); @@ -282,7 +282,7 @@ gulp.task('bundle-framework', function bundleBoot() { .pipe(source(bundleFileName)) .pipe(buffer()) .pipe(sourcemaps.init({ loadMaps: true })) - .pipe(gulpif(!isDev, uglify())) + .pipe(uglify()) .pipe(sourcemaps.write('./')) .pipe(gulp.dest(PATHS.ADMIN_JAVASCRIPT_DIST)); });