From: Michał Gołębiowski Date: Mon, 25 Apr 2016 20:35:15 +0000 (+0200) Subject: Build: Strip the strict-mode related comment in exports/global.js X-Git-Tag: 3.0.0-rc1~25 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=3b356cfde431142eeaae4a916231487716ee4f23;p=jquery.git Build: Strip the strict-mode related comment in exports/global.js The comment (& the JSHint pragma) doesn't make sense in the context of the full built file. Closes gh-3078 --- diff --git a/build/tasks/build.js b/build/tasks/build.js index 926348182..ab1c993a0 100644 --- a/build/tasks/build.js +++ b/build/tasks/build.js @@ -39,7 +39,10 @@ module.exports = function( grunt ) { skipSemiColonInsertion: true, wrap: { start: wrapper[ 0 ].replace( /\/\*jshint .* \*\/\n/, "" ), - end: globals + wrapper[ 1 ] + end: globals.replace( + /\/\*\s*ExcludeStart\s*\*\/[\w\W]*?\/\*\s*ExcludeEnd\s*\*\//ig, + "" + ) + wrapper[ 1 ] }, rawText: {}, onBuildWrite: convert diff --git a/src/exports/global.js b/src/exports/global.js index c8d593cbb..a50fbb6cd 100644 --- a/src/exports/global.js +++ b/src/exports/global.js @@ -1,7 +1,11 @@ +/* ExcludeStart */ + // This file is included in a different way from all the others // so the "use strict" pragma is not needed. /* jshint strict: false */ +/* ExcludeEnd */ + var // Map over jQuery in case of overwrite