classafDuvet::ScriptModule
sys::Obj afDuvet::ScriptModule
Module configuration for those that do not conform to AMD specification. Contribute instances to ScriptModules. Example:
@Contribute { serviceType=ScriptModules# }
static Void contributeScriptModules(OrderedConfig config) {
    jqueryModule := ScriptModule("jquery").atUrl(`/scripts/jquery-2.1.1.min.js`).exports("jQuery") 
    config.add(jqueryModule)
}
ScriptModule instances are used to create a 'shim' for RequireJS modules.
- atUrl
- If the module can not be found under the baseUrl then this dictates where it can be downloaded from. May be an external or local URL. 
- exports
- The name of a global variable exported by the module. This will be the value injected into modules that depend on the shim. 
- fallbackToUrl
- This fallbackToUrl(Uri moduleUrl)- Dictates an alternative location for the module should the primary download fail. May be an external or local URL. 
- initWith
- An alternative to - exports, this allows the module to be initialised with a short expression.- @see http://requirejs.org/docs/api.html#config-shim for details. 
- make
- new make(Str moduleId)- Creates a - ScriptModulefor the given- moduleId.
- requires
- A list of other module names the shim depends on. Multiple module names should be split by whitespace. Example: - ScriptModule("myModule").requires("jquery bootstrap")