Dependency Management Got Awesome
CommonJS and AMD Compliant dependency loader for modern web apps
require
0.7.x
require(['one', 'two', 'three'], function (one, two, three) {});
AMD specifies an alternate syntax for require, which takes an array of dependencies, followed by a callback function which receives the list of paramters in the order they were listed. Key builtins of require
, module
, and exports
won’t resolve to modules, but instead will resolve to their matching module counterparts. It’s behavior is very similar in design to require.ensure.
- CommonJS Interface
- AMD Interface
- The Inject API
- Inject.addContentRule
- Inject.addFetchRule
- Inject.addFileRule
- Inject.addModuleRule
- Inject.addPackage
- Inject.createContext
- Inject.disableAMD
- Inject.disableSourceUrls
- Inject.disableSuffixes
- Inject.enableAMD
- Inject.enableSourceUrls
- Inject.enableSuffixes
- Inject.reset
- Inject.setCacheKey
- Inject.setCrossDomain
- Inject.setExpires
- Inject.setModuleRoot
- require.run
- How To and Tutorials