@@ -145,7 +145,7 @@ var requirejs, require, define;
145145 baseUrl : "./" ,
146146 paths : { } ,
147147 pkgs : { } ,
148- legacy : { }
148+ shim : { }
149149 } ,
150150 registry = { } ,
151151 undefEvents = { } ,
@@ -725,7 +725,7 @@ var requirejs, require, define;
725725 Module = function ( map ) {
726726 this . events = undefEvents [ map . id ] || { } ;
727727 this . map = map ;
728- this . legacy = config . legacy [ map . id ] ;
728+ this . shim = config . shim [ map . id ] ;
729729 this . depExports = [ ] ;
730730 this . depMaps = [ ] ;
731731 this . depMatched = [ ] ;
@@ -844,8 +844,8 @@ var requirejs, require, define;
844844 //ask the plugin to load it now.
845845 if ( map . prefix ) {
846846 this . callPlugin ( ) ;
847- } else if ( this . legacy ) {
848- makeRequire ( this , true ) ( this . legacy . deps || [ ] , bind ( this , function ( ) {
847+ } else if ( this . shim ) {
848+ makeRequire ( this , true ) ( this . shim . deps || [ ] , bind ( this , function ( ) {
849849 this . load ( ) ;
850850 } ) ) ;
851851 } else {
@@ -1142,7 +1142,7 @@ var requirejs, require, define;
11421142 //they are additive.
11431143 var paths = config . paths ,
11441144 pkgs = config . pkgs ,
1145- legacy = config . legacy ,
1145+ shim = config . shim ,
11461146 map = config . map || { } ;
11471147
11481148 //Mix in the config values, favoring the new values over
@@ -1159,21 +1159,21 @@ var requirejs, require, define;
11591159 config . map = map ;
11601160 }
11611161
1162- //Merge legacy
1163- if ( cfg . legacy ) {
1164- eachProp ( cfg . legacy , function ( value , id ) {
1162+ //Merge shim
1163+ if ( cfg . shim ) {
1164+ eachProp ( cfg . shim , function ( value , id ) {
11651165 //Normalize the structure
11661166 if ( isArray ( value ) ) {
11671167 value = {
11681168 deps : value
11691169 } ;
11701170 }
11711171 if ( value . exports && ! value . exports . __buildReady ) {
1172- value . exports = context . makeLegacyExports ( value . exports ) ;
1172+ value . exports = context . makeShimExports ( value . exports ) ;
11731173 }
1174- legacy [ id ] = value ;
1174+ shim [ id ] = value ;
11751175 } ) ;
1176- config . legacy = legacy ;
1176+ config . shim = shim ;
11771177 }
11781178
11791179 //Adjust packages if necessary.
@@ -1212,7 +1212,7 @@ var requirejs, require, define;
12121212 }
12131213 } ,
12141214
1215- makeLegacyExports : function ( exports ) {
1215+ makeShimExports : function ( exports ) {
12161216
12171217 if ( typeof exports === 'string' ) {
12181218 return function ( ) {
@@ -1333,7 +1333,7 @@ var requirejs, require, define;
13331333 * @param {String } moduleName the name of the module to potentially complete.
13341334 */
13351335 completeLoad : function ( moduleName ) {
1336- var legacy = config . legacy [ moduleName ] || { } ,
1336+ var shim = config . shim [ moduleName ] || { } ,
13371337 found , args ;
13381338
13391339 takeGlobalQueue ( ) ;
@@ -1360,7 +1360,7 @@ var requirejs, require, define;
13601360 if ( ! found && ! defined [ moduleName ] ) {
13611361 //A script that does not call define(), so just simulate
13621362 //the call for it.
1363- callGetModule ( [ moduleName , ( legacy . deps || [ ] ) , legacy . exports ] ) ;
1363+ callGetModule ( [ moduleName , ( shim . deps || [ ] ) , shim . exports ] ) ;
13641364 }
13651365
13661366 checkLoaded ( ) ;
0 commit comments