Constructor
new ScriptProvider(rootDir)
Returns a new instance of ScriptProvider
Parameters:
Name | Type | Default | Description |
---|---|---|---|
rootDir |
string |
/scripts/
|
The root scripts directory |
Methods
getFile(id, type) → {string}
Retrieves the requested script file (internal)
Parameters:
Name | Type | Description |
---|---|---|
id |
string | The file identifier (name) |
type |
string | The type of script |
Throws:
Error
Returns:
The JS file as a string
- Type
- string
getScript(request) → {string}
Retrieves the requested script file
Parameters:
Name | Type | Description |
---|---|---|
request |
string |
Throws:
Error
Returns:
The JS file as a string
- Type
- string