• property

map

 

steal.config( "map", mapConfig )

Maps moduleIds to other moduleIds when stolen in a particular location.

The following maps jquery/jquery.js to jquery-1.8.3.js in filemanager and jquery/jquery.js to jquery-1.4.2.js in taskmanager:

steal.config({
  maps: {
    filemanager: {
         "jquery/jquery.js": "jquery-1.8.3.js"
    },
    taskmanager: {
      "jquery/jquery.js": "jquery-1.4.2.js"
    }
  }
});

In filemanager/filemanager.js:

steal('jquery')

... will load jquery-1.8.3.js. To configure the location of jquery-1.8.3.js, use steal.config.paths.

To map ids within any location, use "*":

steal.config({
  maps: {
    "*": {
         "jquery/jquery.js": "jquery-1.8.3.js"
    }
  }
});

mapConfig

mapConfig is a map of a "require-er" moduleId to a mapping of ids like:

{
      "require-er" : {requiredId: moduleId}
}

where:

  • require-er is a moduleId or folderId where the requiredId is stolen.
  • requiredId is the id returned by steal.id.
  • moduleId is the moduleId that will be retrieved.