Permalink
Browse files

Build: Set correct minification options for uglify

Fixes #300
Closes #302
  • Loading branch information...
dmethvin committed Mar 31, 2018
1 parent 98b61ad commit 42f1d9e369ca33d73a3b89bd9765bd72ac277760
Showing with 28 additions and 9 deletions.
  1. +27 −8 Gruntfile.js
  2. +1 −1 test/index.html
View
@@ -74,14 +74,33 @@ module.exports = function( grunt ) {
uglify: {
all: {
files: {
"dist/jquery-migrate.min.js": [ "src/migratemute.js", "dist/jquery-migrate.js" ]
}
},
options: {
banner: "/*! jQuery Migrate v<%= pkg.version %>" +
" | (c) <%= pkg.author.name %> | jquery.org/license */\n",
beautify: {
ascii_only: true
"dist/jquery-migrate.min.js":
[ "src/migratemute.js", "dist/jquery-migrate.js" ]
},
options: {
preserveComments: false,
sourceMap: true,
sourceMapName: "dist/jquery-migrate.min.map",
report: "min",
output: {
"ascii_only": true,
// Support: Android 4.0 only
// UglifyJS 3 breaks Android 4.0 if this option is not enabled.
// This is in lieu of setting ie8 for all of mangle, compress, and output
"ie8": true
},
banner: "/*! jQuery Migrate v<%= pkg.version %>" +
" | (c) <%= pkg.author.name %> | jquery.org/license */",
compress: {
"hoist_funs": false,
loops: false,
// Support: IE <11
// typeofs transformation is unsafe for IE9-10
// See https://github.com/mishoo/UglifyJS2/issues/2198
typeofs: false
}
}
}
},
View
@@ -19,7 +19,7 @@
</script>
<script>
jQuery.noConflict();
TestManager.loadProject( "jquery-migrate", "dev", true );
TestManager.loadProject( "jquery-migrate", "min", true );
</script>
<!-- Version comparisons -->

0 comments on commit 42f1d9e

Please sign in to comment.