new URLBuilder(configParser)
Creates an instance of URLBuilder class.
Parameters:
| Name | Type | Description |
|---|---|---|
configParser |
object | instance of ConfigParser object. |
- Source:
Methods
-
_generateBufferURLs(modules, urls, config) → {Array.<Object>}
-
Generate the appropriate set of URLs based on the list of required modules and the maximum allowed URL length
Parameters:
Name Type Description modulesArray.<String> Array of module names urlsArray.<String> Array of module URLs configObject Configuration object containing URL, basePath and urlMaxLength - Source:
Returns:
Resulting array of {modules, url} objects- Type
- Array.<Object>
-
<protected> _getModulePath(module) → {string}
-
Returns the path for a module. If module has property path, it will be returned directly. Otherwise, the name of module will be used and extension .js will be added to module name if omitted.
Parameters:
Name Type Description moduleobject The module which path should be returned. - Source:
Returns:
Module path.- Type
- string
-
build(modules) → {array}
-
Returns a list of URLs from provided list of modules.
Parameters:
Name Type Description modulesarray List of modules for which URLs should be created. - Source:
Returns:
List of URLs.- Type
- array