Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 14 additions & 13 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -329,25 +329,26 @@ module.exports = function( grunt ) {
files: [ "<%= eslint.dev.src %>" ],
tasks: [ "dev" ]
},
uglify: {
terser: {
all: {
files: {
"dist/<%= grunt.option('filename').replace('.js', '.min.js') %>":
"dist/<%= grunt.option('filename') %>"
},
options: {
preserveComments: false,
sourceMap: true,
sourceMapName:
"dist/<%= grunt.option('filename').replace('.js', '.min.map') %>",
report: "min",
output: {
"ascii_only": true
ecma: 5,
sourceMap: {
filename: "dist/<%= grunt.option('filename').replace('.js', '.min.map') %>"
},
format: {
ascii_only: true,
comments: false,
preamble: "/*! jQuery v<%= pkg.version %> | " +
"(c) OpenJS Foundation and other contributors | " +
"jquery.org/license */"
},
banner: "/*! jQuery v<%= pkg.version %> | " +
"(c) OpenJS Foundation and other contributors | jquery.org/license */",
compress: {
"hoist_funs": false,
hoist_funs: false,
loops: false
}
}
Expand Down Expand Up @@ -416,7 +417,7 @@ module.exports = function( grunt ) {
grunt.registerTask( "dev", [
"build:*:*",
runIfNewNode( "newer:eslint:dev" ),
"newer:uglify",
"newer:terser",
"remove_map_comment",
"dist:*",
"qunit_fixture",
Expand All @@ -427,7 +428,7 @@ module.exports = function( grunt ) {
runIfNewNode( "eslint:dev" ),
"build:*:*",
"amd",
"uglify",
"terser",
"remove_map_comment",
"dist:*",
"test:prepare",
Expand Down
2 changes: 1 addition & 1 deletion build/tasks/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,6 @@ module.exports = function( grunt ) {
"";

grunt.log.writeln( "Creating custom build...\n" );
grunt.task.run( [ "build:*:*" + ( modules ? ":" + modules : "" ), "uglify", "dist" ] );
grunt.task.run( [ "build:*:*" + ( modules ? ":" + modules : "" ), "terser", "dist" ] );
} );
};
2 changes: 1 addition & 1 deletion build/tasks/sourcemap.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
var fs = require( "fs" );

module.exports = function( grunt ) {
var config = grunt.config( "uglify.all.files" );
var config = grunt.config( "terser.all.files" );
grunt.registerTask( "remove_map_comment", function() {
var minLoc = grunt.config.process( Object.keys( config )[ 0 ] );

Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@
"grunt-babel": "8.0.0",
"grunt-cli": "1.4.3",
"grunt-compare-size": "0.4.2",
"grunt-contrib-uglify": "3.4.0",
"grunt-contrib-watch": "1.1.0",
"grunt-eslint": "24.0.0",
"grunt-git-authors": "3.2.0",
"grunt-jsonlint": "2.1.2",
"grunt-karma": "4.0.2",
"grunt-newer": "1.3.0",
"grunt-npmcopy": "0.2.0",
"grunt-terser": "2.0.0",
"gzip-js": "0.3.2",
"husky": "4.2.5",
"jsdom": "19.0.0",
Expand All @@ -67,8 +67,8 @@
"rollup": "2.21.0",
"sinon": "7.3.1",
"strip-json-comments": "3.1.1",
"testswarm": "1.1.2",
"uglify-js": "3.4.7"
"terser": "5.17.6",
"testswarm": "1.1.2"
},
"scripts": {
"build": "npm install && grunt",
Expand Down