Skip to content

GenerateFromTemplate

@aurorajs.dev/catalyst-cli


@aurorajs.dev/catalyst-cli / generator/engine/file-manager / generateFromTemplate

generateFromTemplate(logger, templateElement, relativeTargetBasePath, relativeTargetPath, options?, result?): Promise<GenerationResult>

Defined in: generator/engine/file-manager.ts:113

Generate every file under a template element into the consumer project.

Main programmatic entry point of the generator engine. Commands in src/commands/generate/ call this for each element they need to render.

FileLogger

Sink for [FILE CREATED], [FILE OVERWRITE], [REGION ...] logs.

TemplateElement

Which template tree to expand. Known values are declared in TemplateElement.

string

Where the output tree lives, relative to process.cwd() (e.g. backend, frontend).

string

Subdirectory under the base (often derived from the aggregate or module being generated).

GenerateOptions = {}

See GenerateOptions.

GenerationResult = ...

Accumulator. Pass an existing GenerationResult across multiple calls to collect the combined lockfile/origin list in one run.

Promise<GenerationResult>

The (possibly pre-existing) result object, for chaining.