CLISHBuildCommand
Extends:
This is the 'real build command'. This is a private command the shell script executes in order to get a list of commands to run.
TODO:
- This whole class needs a refactor (args and params are the same!).
Constructor Summary
| Public Constructor | ||
| public |
constructor(builder: Builder, cliCleanCommand: CLICleanCommand, cliCopyProjectFilesCommand: CLICopyProjectFilesCommand, cliRevisionCommand: CLIRevisionCommand, cliSHCopyCommand: CLISHCopyCommand, cliSHNodeRunCommand: CLISHNodeRunCommand, cliSHNodeWatchCommand: CLISHNodeWatchCommand, cliSHTranspileCommand: CLISHTranspileCommand, events: Events, projectConfiguration: ProjectConfigurationSettings, targets: Targets) Class constructor. |
|
Member Summary
| Public Members | ||
| public |
Enable unknown options so other services can customize the build command. |
|
| public |
A local reference for the |
|
| public |
A local reference for the |
|
| public |
cliCleanCommand: CliCleanCommand A local reference for the |
|
| public |
cliCopyProjectFilesCommand: CliCopyProjectFilesCommand A local reference for the |
|
| public |
cliRevisionCommand: CliRevisionCommand A local reference for the |
|
| public |
cliSHCopyCommand: CliSHCopyCommand A local reference for the |
|
| public |
cliSHNodeRunCommand: CliSHNodeRunCommand A local reference for the |
|
| public |
cliSHNodeWatchCommand: CliSHNodeWatchCommand A local reference for the |
|
| public |
cliSHTranspileCommand: CliSHTranspileCommand A local reference for the |
|
| 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 |
A local reference for the |
|
| public |
Hide the command from the help interface. |
|
| public |
All the project settings. |
|
| public |
A local reference for the |
|
Method Summary
| Public Methods | ||
| public |
handle(name: string, command: Command, options: CLIBuildCommandOptions, unknownOptions: 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 |
Add a new option for the command. |
|
| public |
Generate an instruction for this command. |
|
| public abstract |
handle() Handle the command execution. |
|
| public |
A simple wrapper for a |
|
| public |
Register this command on a CLI program. |
|
Public Constructors
public constructor(builder: Builder, cliCleanCommand: CLICleanCommand, cliCopyProjectFilesCommand: CLICopyProjectFilesCommand, cliRevisionCommand: CLIRevisionCommand, cliSHCopyCommand: CLISHCopyCommand, cliSHNodeRunCommand: CLISHNodeRunCommand, cliSHNodeWatchCommand: CLISHNodeWatchCommand, cliSHTranspileCommand: CLISHTranspileCommand, events: Events, projectConfiguration: ProjectConfigurationSettings, targets: Targets) source
Class constructor.
Override:
CLICommand#constructorParams:
| Name | Type | Attribute | Description |
| builder | Builder | Needed to generate a target build command. |
|
| cliCleanCommand | CLICleanCommand | Needed to generate the command that cleans a target files. |
|
| cliCopyProjectFilesCommand | CLICopyProjectFilesCommand | Needed to generate the command to copy the project files if the feature of copying on build is enabled. |
|
| cliRevisionCommand | CLIRevisionCommand | Needed to generate the command that creates the revision file if the feature of generating it on build is enabled. |
|
| cliSHCopyCommand | CLISHCopyCommand | Needed to generate the command to copy the target files if the target doesn't require bundling. |
|
| cliSHNodeRunCommand | CLISHNodeRunCommand | Needed to generate the command
to run a Node target if the
|
|
| cliSHNodeWatchCommand | CLISHNodeWatchCommand | Needed to generate the command
to watch a Node target files
if the |
|
| cliSHTranspileCommand | CLISHTranspileCommand | Needed to generate the command to transpile a Node target code. |
|
| events | Events | Used to reduce the list of commands generated. |
|
| projectConfiguration | ProjectConfigurationSettings | Used to read and validate the features. |
|
| targets | Targets | Used to get the targets information. |
Public Members
public allowUnknownOptions: boolean source
Enable unknown options so other services can customize the build command.
Override:
CLICommand#allowUnknownOptionspublic buildTypeScriptHelper: BuildTypeScriptHelper source
A local reference for the buildTypeScriptHelper service.
public cliCopyProjectFilesCommand: CliCopyProjectFilesCommand source
A local reference for the cliCopyProjectFilesCommand service.
public cliRevisionCommand: CliRevisionCommand source
A local reference for the cliRevisionCommand service.
public cliSHCopyCommand: CliSHCopyCommand source
A local reference for the cliSHCopyCommand service.
public cliSHNodeRunCommand: CliSHNodeRunCommand source
A local reference for the cliSHNodeRunCommand service.
public cliSHNodeWatchCommand: CliSHNodeWatchCommand source
A local reference for the cliSHNodeWatchCommand service.
public cliSHTranspileCommand: CliSHTranspileCommand source
A local reference for the cliSHTranspileCommand service.
public command: string source
The instruction needed to trigger the command.
Override:
CLICommand#commandpublic 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#descriptionPublic Methods
public handle(name: string, command: Command, options: CLIBuildCommandOptions, unknownOptions: Object) source
Handle the execution of the command and outputs the list of commands to run.
This method emits the event reducer build-target-commands-list with the list of commands,
the target information, the type of build and whether or not the target should be executed;
and it expects a list of commands on return.
Override:
CLICommand#handleParams:
| Name | Type | Attribute | Description |
| name | string |
|
The name of the target. |
| command | Command | The executed command (sent by |
|
| options | CLIBuildCommandOptions | The command options. |
|
| unknownOptions | Object | A dictionary of extra options that command may have received. |
