Module: @kosko/template#

Index#

References#

Interfaces#

Functions#

References#

File#

Re-exports: File


Result#

Re-exports: Result


Template#

Re-exports: Template


run#

Re-exports: run


writeFiles#

Re-exports: writeFiles

Functions#

run#

run(template: Template<any>, argv?: string[]): Promise<void>

Defined in packages/template/src/cli.ts:14

Parse command line arguments and generate files with a template.

Parameters:#

NameTypeDefault valueDescription
templateTemplate<any>-Template
argvstring[]process.argv.slice(2)Command line arguments

Returns: Promise<void>


writeFiles#

writeFiles(path: string, files: ReadonlyArray<File>): Promise<void>

Defined in packages/template/src/write.ts:16

Write files to the specified path.

Parameters:#

NameTypeDescription
pathstringDestination path
filesReadonlyArray<File>Files to write

Returns: Promise<void>