GenerateFromTemplate
@aurorajs.dev/catalyst-cli / generator/engine/file-manager / generateFromTemplate
Function: generateFromTemplate()
Section titled “Function: 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.
Parameters
Section titled “Parameters”logger
Section titled “logger”Sink for [FILE CREATED], [FILE OVERWRITE], [REGION ...] logs.
templateElement
Section titled “templateElement”Which template tree to expand. Known values are declared in TemplateElement.
relativeTargetBasePath
Section titled “relativeTargetBasePath”string
Where the output tree lives, relative to
process.cwd() (e.g. backend, frontend).
relativeTargetPath
Section titled “relativeTargetPath”string
Subdirectory under the base (often derived from the aggregate or module being generated).
options?
Section titled “options?”GenerateOptions = {}
See GenerateOptions.
result?
Section titled “result?”GenerationResult = ...
Accumulator. Pass an existing GenerationResult across
multiple calls to collect the combined lockfile/origin list in one run.
Returns
Section titled “Returns”Promise<GenerationResult>
The (possibly pre-existing) result object, for chaining.