Dependency Management Got Awesome
CommonJS and AMD Compliant dependency loader for modern web apps
Inject.setModuleRoot
0.7.x
Inject.setModuleRoot('/path/to/js');
Inject.setModuleRoot('http://example.com/path/to/js');
Specify the path to your “modules” directory. This path can either be defined with a leading slash for same-server downloads, or can be given a full http URL for absolute paths or instances where you might be using a CDN with Inject. Inject uses this path when converting a module’s identifier into a URL.
- 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