aboutsummaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorTimmy Willison <timmywillisn@gmail.com>2013-12-19 15:00:06 -0500
committerTimmy Willison <timmywillisn@gmail.com>2013-12-19 15:36:34 -0500
commit1d3b60044b730859a4f547daa3cd14c85abb5c9d (patch)
treef9d554c13857dae2d5b0961e40117c87c72de495 /build
parent0e89df5b6d681b219939faceffe258866c8e122e (diff)
downloadjquery-1d3b60044b730859a4f547daa3cd14c85abb5c9d.tar.gz
jquery-1d3b60044b730859a4f547daa3cd14c85abb5c9d.zip
Build: Add the ability to remove global exposure.
Ref #14016 Conflicts: build/tasks/build.js src/core.js
Diffstat (limited to 'build')
-rw-r--r--build/tasks/build.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/build/tasks/build.js b/build/tasks/build.js
index aacb5abd8..7b3f69131 100644
--- a/build/tasks/build.js
+++ b/build/tasks/build.js
@@ -87,7 +87,7 @@ module.exports = function( grunt ) {
"build",
"Concatenate source, remove sub AMD definitions, (include/exclude modules with +/- flags), embed date/version",
function() {
- var flag,
+ var flag, index,
done = this.async(),
flags = this.flags,
optIn = flags[ "*" ],
@@ -186,6 +186,13 @@ module.exports = function( grunt ) {
excluder( flag );
}
+ // Replace exports/global with a noop noConflict
+ if ( (index = excluded.indexOf( "exports/global" )) > -1 ) {
+ config.rawText[ "exports/global" ] = "define(['../core']," +
+ "function( jQuery ) {\njQuery.noConflict = function() {};\n});";
+ excluded.splice( index, 1 );
+ }
+
grunt.verbose.writeflags( excluded, "Excluded" );
grunt.verbose.writeflags( included, "Included" );