XpmBuildConfigurations.initialise() method
Completes the async initialisation of the build configurations collection.
Signature
initialise(): Promise<boolean>;
Returns
Promise<boolean>
A promise that resolves to true if initialisation was performed, or false if already initialised.
Exceptions
XpmError If duplicate names are detected or template expansion fails.
Remarks
This method implements the first step of lazy evaluation. It processes all build configuration definitions by expanding template configuration names based on matrix parameters, but does not evaluate the configuration content or perform Liquid substitutions. The actual template evaluation and variable substitution occur later when individual configurations are initialised via XpmBuildConfiguration.initialise(), and only for configurations that are actually used. This approach avoids unnecessary operations on unused configurations.
Processing steps:
- Return early if already initialised (idempotent behaviour).
- Iterate through all build configuration definitions from the JSON object.
- For template configurations (names containing
{{):- Call
\_processTemplate()to expand and register all generated configurations.
- Call
- For regular configurations:
- Validate uniqueness of the configuration name.
- Register the configuration in internal maps with
undefinedvalue (lazy loading).
- Cache the array of all configuration names for efficient repeated access.
Generated via tsdoc2docusaurus 1.3.0-pre by API Extractor/Documenter 7.55.2.