This PR introduces two new options (handler functions) to parse source and transform target paths. We use a template engine where the paths to the resources are generate at runtime and therefore it's necessary to modify the paths before processing. I've added a test to show a possible use-case.
options.parseSourcePath
Type: Function
Return: The path to the source file
Function to parse the source path out of a script or style element.
The function gets the following arguments:
tag (String): The html script or style tag
type: (String): The type e.g. js, css
options.transformTargetPath
Type: Function
Return: The transformed path to the target file
This PR introduces two new options (handler functions) to parse source and transform target paths. We use a template engine where the paths to the resources are generate at runtime and therefore it's necessary to modify the paths before processing. I've added a test to show a possible use-case.
options.parseSourcePath
Type:
Function
Return: The path to the source fileFunction to parse the source path out of a script or style element.
The function gets the following arguments:
js
,css
options.transformTargetPath
Type:
Function
Return: The transformed path to the target fileFunction to transform the target file path.
The function gets the following arguments:
js
,css