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.
This commit is contained in:
Ingo Schommer 2016-04-05 09:13:01 +12:00
parent 0fadd7a15a
commit 759c40793f

View File

@ -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));
});