aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichał Gołębiowski <m.goleb@gmail.com>2016-04-25 22:35:15 +0200
committerMichał Gołębiowski <m.goleb@gmail.com>2016-04-26 22:50:22 +0200
commit3b356cfde431142eeaae4a916231487716ee4f23 (patch)
treeaeaf677eef74c096b210567347aa4af46f5557d3
parent0652c4d6a203a1c56ab08f62d6649ba31b7ddfab (diff)
downloadjquery-3b356cfde431142eeaae4a916231487716ee4f23.tar.gz
jquery-3b356cfde431142eeaae4a916231487716ee4f23.zip
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
-rw-r--r--build/tasks/build.js5
-rw-r--r--src/exports/global.js4
2 files changed, 8 insertions, 1 deletions
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