diff options
Diffstat (limited to 'Gruntfile.js')
-rw-r--r-- | Gruntfile.js | 39 |
1 files changed, 10 insertions, 29 deletions
diff --git a/Gruntfile.js b/Gruntfile.js index a341600c6..ccbf5301a 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -5,7 +5,7 @@ module.exports = function( grunt ) { var data = {}; try { data = grunt.file.readJSON( filepath ); - } catch(e) {} + } catch ( e ) {} return data; } @@ -17,8 +17,8 @@ module.exports = function( grunt ) { delete srcHintOptions.onevar; grunt.initConfig({ - pkg: grunt.file.readJSON("package.json"), - dst: readOptionalJSON("dist/.destination.json"), + pkg: grunt.file.readJSON( "package.json" ), + dst: readOptionalJSON( "dist/.destination.json" ), compare_size: { files: [ "dist/jquery.js", "dist/jquery.min.js" ], options: { @@ -89,39 +89,28 @@ module.exports = function( grunt ) { tasks: "build/tasks/*.js" }, testswarm: { - tests: "ajax attributes callbacks core css data deferred dimensions effects event manipulation offset queue selector serialize support traversing Sizzle".split(" ") + tests: "ajax attributes callbacks core css data deferred dimensions effects event manipulation offset queue selector serialize support traversing Sizzle".split( " " ) }, watch: { files: [ "<%= jshint.grunt.src %>", "<%= jshint.tests.src %>", "src/**/*.js" ], tasks: "dev" }, - "pre-uglify": { - all: { - files: { - "dist/jquery.pre-min.js": [ "dist/jquery.js" ] - }, - options: { - banner: "\n\n\n\n\n\n\n\n\n\n\n\n" + // banner line size must be preserved - "/*! jQuery v<%= pkg.version %> | " + - "(c) 2005, 2013 jQuery Foundation, Inc. | " + - "jquery.org/license */\n" - } - } - }, uglify: { all: { files: { - "dist/jquery.min.js": [ "dist/jquery.pre-min.js" ] + "dist/jquery.min.js": [ "dist/jquery.js" ] }, options: { - // Keep our hard-coded banner - preserveComments: "some", + preserveComments: false, sourceMap: "dist/jquery.min.map", sourceMappingURL: "jquery.min.map", report: "min", beautify: { ascii_only: true }, + banner: "/*! jQuery v<%= pkg.version %> | " + + "(c) 2005, 2013 jQuery Foundation, Inc. | " + + "jquery.org/license */", compress: { hoist_funs: false, loops: false, @@ -129,14 +118,6 @@ module.exports = function( grunt ) { } } } - }, - "post-uglify": { - all: { - src: [ "dist/jquery.min.map" ], - options: { - tempFiles: [ "dist/jquery.pre-min.js" ] - } - } } }); @@ -150,5 +131,5 @@ module.exports = function( grunt ) { grunt.registerTask( "dev", [ "build:*:*", "jshint", "jscs" ] ); // Default grunt - grunt.registerTask( "default", [ "jsonlint", "dev", "pre-uglify", "uglify", "post-uglify", "dist:*", "compare_size" ] ); + grunt.registerTask( "default", [ "jsonlint", "dev", "uglify", "dist:*", "compare_size" ] ); }; |