From 3b356cfde431142eeaae4a916231487716ee4f23 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Micha=C5=82=20Go=C5=82=C4=99biowski?= Date: Mon, 25 Apr 2016 22:35:15 +0200 Subject: [PATCH] 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 --- build/tasks/build.js | 5 ++++- src/exports/global.js | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) 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 -- 2.39.5