]> source.dussan.org Git - jquery.git/commitdiff
Build: Strip the strict-mode related comment in exports/global.js 3078/head
authorMichał Gołębiowski <m.goleb@gmail.com>
Mon, 25 Apr 2016 20:35:15 +0000 (22:35 +0200)
committerMichał Gołębiowski <m.goleb@gmail.com>
Tue, 26 Apr 2016 20:50:22 +0000 (22:50 +0200)
The comment (& the JSHint pragma) doesn't make sense in the context of the
full built file.

Closes gh-3078

build/tasks/build.js
src/exports/global.js

index 9263481828513e6cdf35b4c8eb9d2d5905b38e29..ab1c993a0cc59970d84f2217a3115071b2920853 100644 (file)
@@ -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
index c8d593cbbd43de3496cf5027be47b52dbd8e041b..a50fbb6cddea25fb7a63c11a0839e2ee2f3452e5 100644 (file)
@@ -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