Skip to content
This repository has been archived by the owner on Mar 31, 2020. It is now read-only.

Commit

Permalink
Moved Uglify Config to the Config.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Sven Buijsrogge committed Feb 3, 2016
1 parent a95c787 commit 589f56c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
19 changes: 19 additions & 0 deletions Config.js
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,25 @@ var config = {
}
},

/*
|----------------------------------------------------------------
| UglifyJS Parser/Compressor/Beautifier
|----------------------------------------------------------------
|
| UglifyJS is a JavaScript parser/compressor/beautifier.
| It'll minify your JavaScript with ease and has an option to
| mangle your code.
|
*/

uglify: {
options: {
compress: {
drop_console: true
}
}
},

/*
|----------------------------------------------------------------
| Browserify Compilation
Expand Down
2 changes: 1 addition & 1 deletion tasks/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ var gulpTask = function(paths, babel) {
new Elixir.Notification().error(e, 'Babel Compilation Failed!');
this.emit('end');
})
.pipe($.if(config.production, $.uglify({compress: { drop_console: true }})))
.pipe($.if(config.production, $.uglify(config.js.uglify.options)))
.pipe($.if(config.sourcemaps, $.sourcemaps.write('.')))
.pipe(gulp.dest(paths.output.baseDir))
.pipe(new Elixir.Notification('Scripts Merged!'))
Expand Down

0 comments on commit 589f56c

Please sign in to comment.