Constructor
new Directive(option_values)
Instantiate the directive
Name | Type | Description |
---|---|---|
option_values |
object | mapping of option names to option values |
- Source:
Extends
Members
(static) services
Defines the services required by this directive. Includes the 'cli' and 'output' services by default.
- Source:
(private) _di_allow_defer :boolean
If true, the injector will defer the class if the class requests any services that the container is missing. These services are filled in later and added to the prototype and any instances. True by default.
- boolean
- Source:
(private) _di_deferred_instances :Array.<module:flitter-di/src/Injectable~Injectable>
Collection of instances of this class that need to have the deferred service instances injected into them when the deferred services are finally provided.
- Source:
(private) _di_deferred_services :Array.<string>
List of services that were deferred and not provided at the time of injection.
- Array.<string>
- Source:
(private) _options :Object
Mapping of option names to option values for the current invocation.
- Object
- Source:
Methods
(static) help() → {string}
Get the usage information of the directive. This is displayed on the ./flitter help page.
- Source:
- Type
- string
(static) name() → {string}
Get the name of the directive. This is used by ./flitter to run this directive.
- Source:
- Type
- string
(static) options() → {Array.<module:flitter-cli/options/Option~Option>}
Get an array of the options supported by this directive.
- Source:
- Type
- Array.<module:flitter-cli/options/Option~Option>
error(message)
Outputs an [ERROR] message to the console.
Name | Type | Description |
---|---|---|
message |
string |
- Source:
(async) handle(app, argv) → {Promise.<void>}
Handle an invocation of this directive.
Name | Type | Description |
---|---|---|
app |
module:libflitter/app/FlitterApp~FlitterApp | the Flitter app |
argv |
Array.<string> | CLI arguments after the directive |
- Source:
- Type
- Promise.<void>
info(message)
Outputs an [INFO] message to the console.
Name | Type | Description |
---|---|---|
message |
string |
- Source:
option(name) → {string}
Gets the value of the option with the specified name for the current invocation.
Name | Type | Description |
---|---|---|
name |
string |
- Source:
- Type
- string
success(message)
Outputs a [SUCCESS] message to the console.
Name | Type | Description |
---|---|---|
message |
string |
- Source:
warning(message)
Outputs a [WARNING] message to the console.
Name | Type | Description |
---|---|---|
message |
string |
- Source: