diff options
author | Timmy Willison <timmywillisn@gmail.com> | 2014-12-09 15:39:24 -0500 |
---|---|---|
committer | Timmy Willison <timmywillisn@gmail.com> | 2014-12-10 10:18:59 -0500 |
commit | 57652eecd96e47f39725671ffce45bfa01493380 (patch) | |
tree | f5d839816ade59fbdb54d6003a266c4c2c3a88e3 /src | |
parent | 828a718aa028ba6cde7b4076d94b10ef0853f9ee (diff) | |
download | jquery-57652eecd96e47f39725671ffce45bfa01493380.tar.gz jquery-57652eecd96e47f39725671ffce45bfa01493380.zip |
Build: fix tests in AMD mode
Diffstat (limited to 'src')
-rw-r--r-- | src/.jshintrc | 5 | ||||
-rw-r--r-- | src/exports/global.js | 8 | ||||
-rw-r--r-- | src/jquery.js | 5 | ||||
-rw-r--r-- | src/outro.js | 1 |
4 files changed, 7 insertions, 12 deletions
diff --git a/src/.jshintrc b/src/.jshintrc index 3ffebfd5a..6e8dcd3db 100644 --- a/src/.jshintrc +++ b/src/.jshintrc @@ -21,7 +21,8 @@ "globals": { "jQuery": true, - "define": true, - "module": true + "define": false, + "module": false, + "noGlobal": true } } diff --git a/src/exports/global.js b/src/exports/global.js index 137f5e26b..067516a75 100644 --- a/src/exports/global.js +++ b/src/exports/global.js @@ -1,7 +1,3 @@ -define([ - "../core" -], function( jQuery ) { - var // Map over jQuery in case of overwrite _jQuery = window.jQuery, @@ -24,8 +20,6 @@ jQuery.noConflict = function( deep ) { // Expose jQuery and $ identifiers, even in // AMD (#7102#comment:10, https://github.com/jquery/jquery/pull/557) // and CommonJS for browser emulators (#13566) -if ( typeof noGlobal === "undefined" ) { +if ( !noGlobal ) { window.jQuery = window.$ = jQuery; } - -}); diff --git a/src/jquery.js b/src/jquery.js index 7c1528b88..6e646cf42 100644 --- a/src/jquery.js +++ b/src/jquery.js @@ -29,10 +29,9 @@ define([ "./offset", "./dimensions", "./deprecated", - "./exports/amd", - "./exports/global" + "./exports/amd" ], function( jQuery ) { -return jQuery; +return (window.jQuery = window.$ = jQuery); }); diff --git a/src/outro.js b/src/outro.js index be4600a5c..d792ffb58 100644 --- a/src/outro.js +++ b/src/outro.js @@ -1 +1,2 @@ +return jQuery; })); |