scratch – Diff between revs 58 and 125
?pathlinks?
Rev 58 | Rev 125 | |||
---|---|---|---|---|
1 | define( [ |
1 | define([ |
|
2 | "../core" |
2 | "../core" |
|
3 | ], function( jQuery ) { |
3 | ], function( jQuery ) { |
|
4 | |
- | ||
5 | "use strict"; |
- | ||
6 | |
4 | |
|
7 | // Register as a named AMD module, since jQuery can be concatenated with other |
5 | // Register as a named AMD module, since jQuery can be concatenated with other |
|
8 | // files that may use define, but not via a proper concatenation script that |
6 | // files that may use define, but not via a proper concatenation script that |
|
9 | // understands anonymous AMD modules. A named AMD is safest and most robust |
7 | // understands anonymous AMD modules. A named AMD is safest and most robust |
|
10 | // way to register. Lowercase jquery is used because AMD module names are |
8 | // way to register. Lowercase jquery is used because AMD module names are |
|
11 | // derived from file names, and jQuery is normally delivered in a lowercase |
9 | // derived from file names, and jQuery is normally delivered in a lowercase |
|
12 | // file name. Do this after creating the global so that if an AMD module wants |
10 | // file name. Do this after creating the global so that if an AMD module wants |
|
13 | // to call noConflict to hide this version of jQuery, it will work. |
11 | // to call noConflict to hide this version of jQuery, it will work. |
|
14 | |
12 | |
|
15 | // Note that for maximum portability, libraries that are not jQuery should |
13 | // Note that for maximum portability, libraries that are not jQuery should |
|
16 | // declare themselves as anonymous modules, and avoid setting a global if an |
14 | // declare themselves as anonymous modules, and avoid setting a global if an |
|
17 | // AMD loader is present. jQuery is a special case. For more information, see |
15 | // AMD loader is present. jQuery is a special case. For more information, see |
|
18 | // https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon |
16 | // https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon |
|
19 | |
17 | |
|
20 | if ( typeof define === "function" && define.amd ) { |
18 | if ( typeof define === "function" && define.amd ) { |
|
21 | define( "jquery", [], function() { |
19 | define( "jquery", [], function() { |
|
22 | return jQuery; |
20 | return jQuery; |
|
23 | } ); |
21 | }); |
|
24 | } |
22 | } |
|
25 | |
23 | |
|
26 | } ); |
24 | }); |
|
27 | |
25 | |