Static Method Summary
Static Public Methods | ||
public static |
resolveBin(name: string): Promise<string, Error> Resolves the executable path for the given command. |
|
public static |
Resolves the executable for the given command and runs it with the arguments and options given. |
|
public static |
Spawns an executable with the given args and options. |
Static Public Methods
public static resolveBin(name: string): Promise<string, Error> source
Resolves the executable path for the given command.
Params:
Name | Type | Attribute | Description |
name | string | The command to resolve. |
public static run(name: string, args: string[], options: Object): Promise<string, Error> source
Resolves the executable for the given command and runs it with the arguments and options given.
See the node docs on the child_process
module for all available spawn options.
Params:
Name | Type | Attribute | Description |
name | string | The command to run. |
|
args | string[] |
|
The arguments to use. |
options | Object |
|
The options to use. |
options.spawn | Object |
|
Options to use for the spawned process. |
options.onspawn | function(process: node.ChildProcess) |
|
Callback to call once the process was created. Useful for handling stdio events etc. |
public static spawn(bin: string, args: string[], options: Object): Promise<string, Error> source
Spawns an executable with the given args and options. See the node docs on the child_process
module for all available spawn options.
Params:
Name | Type | Attribute | Description |
bin | string | Path to the executable to run. |
|
args | string[] |
|
The arguments to use. |
options | Object |
|
The options to use. |
options.spawn | Object |
|
Options to use for the spawned process. |
options.onspawn | function(process: node.ChildProcess) |
|
Callback to call once the process was created. Useful for handling stdio events etc. |