mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
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:
parent
0fadd7a15a
commit
759c40793f
@ -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));
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user