1
0
mirror of https://github.com/ascribe/onion.git synced 2024-11-13 16:45:05 +01:00

add uglify compression

This commit is contained in:
Tim Daubenschütz 2015-07-20 11:26:06 +02:00
parent 68dba56a21
commit a7cc33fc5f

View File

@ -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 %>'))