Skip to main content

XpmBuildConfiguration.initialise() method

Completes the async initialisation of the build configuration.

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 substitutions fail.

XpmInputError If inheritance references are invalid or circular.

Remarks

This method resolves inheritance, applies variable substitutions, computes dependencies, and prepares actions.

Initialisation workflow:

  1. Return early if already initialised (idempotent behaviour).
  2. For template configurations: Call \_substituteTemplate() to substitute matrix parameters throughout the entire JSON structure.
  3. For non-template configurations: Call \_substituteInherits() to substitute only the inherits field.
  4. Call \_processInherits() to:
    • Process inheritance chain recursively with circular reference detection.
    • Merge properties, dependencies, and devDependencies from inherited configurations (later overrides earlier).
    • Collect inherited actions into a map.
  5. Apply local properties and update substitution variables context.
  6. For visible configurations: Compute build folder relative path via \_getBuildFolderRelativePath().
  7. Substitute Liquid templates in dependencies and devDependencies.
  8. Create actions collection with inherited actions and local actions.

The substitution context includes package variables, configuration properties, matrix parameters (for templates), and the configuration object itself accessible via configuration.name, etc.


Generated via tsdoc2docusaurus 1.3.0-pre by API Extractor/Documenter 7.55.2.