XpmInitTemplateBase.render() method
Renders a template file using Liquid and writes the output.
Signature
render(inputFileRelativePath: string, outputFileRelativePath: string, substitutionsVariables?: XpmInitTemplateSubstitutionsVariables): Promise<void>;
Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
inputFileRelativePath |
string |
The relative path to the template file within the templates folder. |
|
outputFileRelativePath |
string |
The destination path for the rendered file. |
|
substitutionsVariables |
(Optional) The variables to use for template substitutions (defaults to the instance's substitutionsVariables). |
Returns
Promise<void>
A promise that resolves when the file has been rendered and written.
Exceptions
XpmOutputError If template rendering fails.
Remarks
This method processes a template file through the Liquid templating engine with the provided substitution variables, generating the final output file. Parent directories are created automatically if they do not exist. The template file should be located in the templates folder and use Liquid syntax for variable references (e.g., {{ variableName }}).
The substitution variables include all project properties plus additional context like the current year. If substitutionsVariables is not provided, the instance's substitutionsVariables property is used.
Generated via tsdoc2docusaurus 1.3.0-pre by API Extractor/Documenter 7.55.2.