Classes
- DiffInteraction
Class encapsulating usage of
diff
- GitInteraction
Class encapsulating usage of
git
Methods
(static) CommandRunner(program, optsopt) → {CommandRunnerFunc|ToolkitRunnerFunc}
Construct a command-runner function
- Source:
Invocation of command line tools involves several aspects not covered by
NodeJS's child_process
module: flags, optional arguments, consumption of
STDOUT, provision of input on STDIN, propagating STDERR output to a
meaningful place (often to console
), and handling of child process exit
codes.
The functions returned by this function implement that level of expressivity
for invoking command line tools programmatically: flags and optional arguments
can be given in an Object (to indicate the irrelevance of ordering and to
simplify each tool invocation), STDOUT can be delivered to a function that
receives strings (or to a Writable
stream for more flexibility), timeout
capability is baked in, and coordination of result generation is easy;
failures reject with a meaningful error.
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
program |
string | The name of the program to run |
|||||||||||||||||||||||||||||||||||||||||||||||||||
opts |
object |
<optional> |
Properties
|