XpmBuildConfiguration._substituteTemplate() method
Performs template substitution on the entire build configuration JSON.
Signature
protected _substituteTemplate(): Promise<JsonBuildConfigurationContent>;
Returns
Promise<JsonBuildConfigurationContent>
A promise that resolves to the build configuration content with all template variables substituted.
Exceptions
XpmError If Liquid template substitution fails.
Remarks
This method is invoked during initialisation for template-generated configurations to substitute matrix parameters throughout the entire configuration definition.
Processing steps:
- Stringify the entire JSON build configuration object.
- Check if the stringified JSON contains template syntax (
{{or{%). - If templates are found:
- Perform Liquid substitutions with complete variable context including matrix parameters.
- Parse the substituted JSON string back into an object.
- If no templates are found, return the original configuration as-is.
This comprehensive substitution approach ensures matrix parameters can be referenced anywhere within the configuration (properties, dependencies, actions, etc.), which is necessary for template-generated configurations but would be unnecessarily expensive for regular configurations.
Generated via tsdoc2docusaurus 1.3.0-pre by API Extractor/Documenter 7.55.2.