mirror of
https://github.com/ascribe/onion.git
synced 2024-12-22 17:33:14 +01:00
add uglify compression
This commit is contained in:
parent
68dba56a21
commit
a7cc33fc5f
14
gulpfile.js
14
gulpfile.js
@ -184,7 +184,19 @@ function bundle(watch) {
|
||||
.on('error', notify.onError('Error: <%= error.message %>'))
|
||||
.pipe(gulpif(!argv.production, sourcemaps.write())) // writes .map file
|
||||
.on('error', notify.onError('Error: <%= error.message %>'))
|
||||
.pipe(gulpif(argv.production, uglify()))
|
||||
.pipe(gulpif(argv.production, uglify({
|
||||
mangle: true,
|
||||
compress: {
|
||||
sequences: true,
|
||||
dead_code: true,
|
||||
conditionals: true,
|
||||
booleans: true,
|
||||
unused: true,
|
||||
if_return: true,
|
||||
join_vars: true,
|
||||
drop_console: true
|
||||
}
|
||||
})))
|
||||
.on('error', notify.onError('Error: <%= error.message %>'))
|
||||
.pipe(gulp.dest('./build/js'))
|
||||
.on('error', notify.onError('Error: <%= error.message %>'))
|
||||
|
Loading…
Reference in New Issue
Block a user