Skip to content

Commit

Permalink
fix: fix dojo build by minifying with uglify outside of dojo
Browse files Browse the repository at this point in the history
  • Loading branch information
stdavis committed Mar 12, 2019
1 parent e40825f commit 1b55a48
Show file tree
Hide file tree
Showing 4 changed files with 321 additions and 56 deletions.
31 changes: 31 additions & 0 deletions GruntFile.js
@@ -1,3 +1,4 @@
/* eslint-disable camelcase */
module.exports = function (grunt) {
grunt.loadNpmTasks('intern');
require('load-grunt-tasks')(grunt);
Expand Down Expand Up @@ -227,6 +228,34 @@ module.exports = function (grunt) {
}
}
},
uglify: {
options: {
preserveComments: false,
sourceMap: true,
compress: {
drop_console: true,
passes: 2,
dead_code: true
}
},
stage: {
options: {
compress: {
drop_console: false
}
},
src: ['dist/dojo/dojo.js'],
dest: 'dist/dojo/dojo.js'
},
prod: {
files: [{
expand: true,
cwd: 'dist',
src: ['**/*.js', '!proj4/**/*.js'],
dest: 'dist'
}]
}
},
watch: {
main: {
files: jsFiles.concat(otherFiles),
Expand Down Expand Up @@ -264,6 +293,7 @@ module.exports = function (grunt) {
'newer:imagemin:dynamic',
'clean:build',
'dojo:prod',
'uglify:prod',
'copy:dist',
'processhtml:prod',
'cachebreaker'
Expand All @@ -283,6 +313,7 @@ module.exports = function (grunt) {
'newer:imagemin:dynamic',
'clean:build',
'dojo:stage',
'uglify:stage',
'copy:dist',
'processhtml:stage',
'cachebreaker'
Expand Down

0 comments on commit 1b55a48

Please sign in to comment.