TemplateDirective

flitter-cli/directives/TemplateDirective~ TemplateDirective

Directive to create new files from registered templates by name.

Constructor

new TemplateDirective()

Source:

Extends

Methods

(static) help() → {string}

Source:

Get the usage information for the directive. Used by ./flitter help.

Returns:
Type
string

(static) name() → {string}

Source:

Get the name of the directive. Used by ./flitter.

Returns:

"new"

Type
string

(async) handle(app, argv) → {Promise.<void>}

Source:
Overrides:

Handles an invocation of the directive. Creates a new template with the specified class name. This directive is sub-directory aware and accepts Flitter canonical names.

Parameters:
Name Type Description
app module:libflitter/app/FlitterApp~FlitterApp

the Flitter app

argv Array

the CLI arguments passed after the directive

Returns:
Type
Promise.<void>