skipSemiColonInsertion: true,
wrap: {
startFile: "src/intro.js",
- endFile: "src/outro.js"
+ endFile: [ "src/exports/global.js", "src/outro.js" ]
},
paths: {
sizzle: "../external/sizzle/dist/sizzle"
} else {
- // Ignore jQuery's exports (the only necessary one)
- if ( name !== "jquery" ) {
- contents = contents
- .replace( /\s*return\s+[^\}]+(\}\);[^\w\}]*)$/, "$1" )
- // Multiple exports
- .replace( /\s*exports\.\w+\s*=\s*\w+;/g, "" );
- }
+ contents = contents
+ .replace( /\s*return\s+[^\}]+(\}\);[^\w\}]*)$/, "$1" )
+ // Multiple exports
+ .replace( /\s*exports\.\w+\s*=\s*\w+;/g, "" );
// Remove define wrappers, closure ends, and empty declarations
contents = contents
-define([
- "../core"
-], function( jQuery ) {
-
var
// Map over jQuery in case of overwrite
_jQuery = window.jQuery,
// 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;
}
-
-});
ok( window.strictEvalTest - now < 500, "Code executed synchronously" );
});
-test("noConflict", function() {
- expect(7);
+// This is not run in AMD mode
+if ( jQuery.noConflict ) {
+ test("noConflict", function() {
+ expect(7);
- var $$ = jQuery;
+ var $$ = jQuery;
- strictEqual( jQuery, jQuery.noConflict(), "noConflict returned the jQuery object" );
- strictEqual( window["jQuery"], $$, "Make sure jQuery wasn't touched." );
- strictEqual( window["$"], original$, "Make sure $ was reverted." );
+ strictEqual( jQuery, jQuery.noConflict(), "noConflict returned the jQuery object" );
+ strictEqual( window["jQuery"], $$, "Make sure jQuery wasn't touched." );
+ strictEqual( window["$"], original$, "Make sure $ was reverted." );
- jQuery = $ = $$;
+ jQuery = $ = $$;
- strictEqual( jQuery.noConflict(true), $$, "noConflict returned the jQuery object" );
- strictEqual( window["jQuery"], originaljQuery, "Make sure jQuery was reverted." );
- strictEqual( window["$"], original$, "Make sure $ was reverted." );
- ok( $$().pushStack([]), "Make sure that jQuery still works." );
+ strictEqual( jQuery.noConflict(true), $$, "noConflict returned the jQuery object" );
+ strictEqual( window["jQuery"], originaljQuery, "Make sure jQuery was reverted." );
+ strictEqual( window["$"], original$, "Make sure $ was reverted." );
+ ok( $$().pushStack([]), "Make sure that jQuery still works." );
- window["jQuery"] = jQuery = $$;
-});
+ window["jQuery"] = jQuery = $$;
+ });
+}
test("trim", function() {
expect(13);