Home Reference Source
public class | source

CLISHRunCommand

Extends:

CLICommand → CLISHRunCommand

This is private command the shell script executes in order to get a list of commands to run.

Constructor Summary

Public Constructor
public

constructor(runner: Runner)

Class constructor.

Member Summary

Public Members
public

The instruction needed to trigger the command.

public

A description of the command, just to follow the interface as the command won't show up on the help interface.

public

Hide the command from the help interface.

public

A local reference for the runner service.

Method Summary

Public Methods
public

handle(target: string, command: Command, options: Object)

Handle the execution of the command and outputs the list of commands to run.

Inherited Summary

From class CLICommand
public

Whether or not the command supports unknown options.

public

This is a useful flag for when the command is ran as a result of another command.

public

This is the name of the program that runs the command.

public

The CLI command instruction.

public

A description of the command for the help interface.

public

A more complete description of the command to show when the command help interface is invoked.

public

Whether the command and its description should be shown on the CLI interface list of commands.

public

A list with the name of the options the command supports.

public

A dictionary of command options settings by their option name.

public

Whether or not a sub program should be executed for this command.

private

This dictionary will be completed when the command gets activated.

public

addOption(name: string, instruction: string, description: string, defaultValue: string)

Add a new option for the command.

public

Generate an instruction for this command.

public abstract

handle()

Handle the command execution.

public

output(text: string)

A simple wrapper for a console.log.

public

register(program: Command, cli: Object)

Register this command on a CLI program.

Public Constructors

public constructor(runner: Runner) source

Class constructor.

Override:

CLICommand#constructor

Params:

NameTypeAttributeDescription
runner Runner

The service tha provides the commands to run.

Public Members

public command: string source

The instruction needed to trigger the command.

Override:

CLICommand#command

public description: string source

A description of the command, just to follow the interface as the command won't show up on the help interface.

Override:

CLICommand#description

public hidden: boolean source

Hide the command from the help interface.

Override:

CLICommand#hidden

public runner: Runner source

A local reference for the runner service.

Public Methods

public handle(target: string, command: Command, options: Object) source

Handle the execution of the command and outputs the list of commands to run.

Override:

CLICommand#handle

Params:

NameTypeAttributeDescription
target string
  • nullable: true

The name of the target to run.

command Command

The executed command (sent by commander).

options Object

The command options.

options.production string

If the user wants to run a production build, even with projext preset.

options.ready boolean

If the user used the production option, then the list of commands will be: one to build the target for production and one to run this command again, because if a build is going to happen, there's no way to be sure the runner file is up to date. This option basically says 'The production build is ready and the runner file is updated, now is ok to execute it'.

options.inspect boolean

Whether or not to enable the Node inspector.