Keyboard Support

Contact and Search

Keyman.com Homepage

Header bottom

Keyman.com

Other versions
Version 18.0

On this page

AbstractGenerator class

Home > @keymanapp/kmc-generate > AbstractGenerator

AbstractGenerator class

Common functionality for generating projects. Do not instantiate this class, rather instantiate a subclass

Signature:

export declare class AbstractGenerator 

Properties

Property Modifiers Type Description
callbacks

protected

readonly

CompilerCallbacks
filenameMap

protected

readonly

{ [index: string]: string; } map of all files to be transformed, filled by this class and subclasses
fullCopyright protected string extension of options.copyright including copyright year
includedPrefixes

protected

readonly

string[] identifiers for lines to include when transforming template files, filled by child classes
options

protected

readonly

GeneratorOptions
SFile_GitIgnore

protected

static

readonly

(not declared)
SFile_HistoryMD

protected

static

readonly

(not declared)
SFile_LicenseMD

protected

static

readonly

(not declared)
SFile_ReadmeHTM

protected

static

readonly

string
SFile_ReadmeMD

protected

static

readonly

(not declared)
SFile_WelcomeHTM

protected

static

readonly

string
SPath_Source

protected

static

readonly

(not declared)
templateBasePath

protected

readonly

string base path for template files in this module
tokenMap

protected

readonly

{ [index: string]: string; } tokens to rewrite in output files

Methods

Method Modifiers Description
defaultArtifacts() protected Fills in the artifact outputPath used by all generators
init(callbacks, options) Initialize the generator. Copies options.
write(artifacts) Write artifacts from a successful compile to disk, via callbacks methods. The artifacts written will include all files from the project, across multiple folders. Folders will be created as needed