Skip to main content

InitTemplateBase.run() method

Executes the template initialisation process.

Signature

run(): Promise<number>;

Returns

Promise<number>

A promise that resolves to 0 on success.

Exceptions

JsonSyntaxError If property validation fails or interactive mode is required but not available (non-TTY environment).

Remarks

This method orchestrates the complete template initialisation workflow. It validates all provided properties, determines whether interactive mode is required (when mandatory properties are missing), prompts for missing values if in a TTY environment, prepares substitution variables including the current year, and invokes the template-specific InitTemplateBase.generate() method to create project files.

The method automatically applies default values to optional properties that were not explicitly set. In interactive mode, the timer is reset after user input to exclude interactive time from performance metrics.


Generated via tsdoc2docusaurus 1.3.2 by API Extractor/Documenter 7.57.2.