tests/helpers/command-generator.js:5
CommandGenerator
A simple tool to make behavior and API consistent between commands the user wraps in this.
Usage:
var bower = new CommandGenerator(require.resolve('bower/bin/bower'));
bower.invoke('install', 'ember');
Constructor Summary
| Private Constructors | |
|---|---|
| private |
CommandGenerator(program): Function
A simple tool to make behavior and API consistent between commands the user wraps in this. |
Method Summary
| Private Methods | |
|---|---|
| private |
command([arguments], [options={}])
The |
Private Constructors
tests/helpers/command-generator.js:5
private CommandGenerator(program): Function
Parameters:
| Name | Type | Attribute | Description |
|---|---|---|---|
| program | Path |
|
The path to the command. |
Return:
Function
A command helper.
Private Methods
tests/helpers/command-generator.js:27
private command([arguments], [options={}])
The invoke method is responsible for building the final executable command.
Parameters:
| Name | Type | Attribute | Description |
|---|---|---|---|
| arguments | String |
|
Arguments to be passed into the command. |
| options | Object |
|
The options passed into child_process.spawnSync. (https://nodejs.org/api/child_process.html#child_process_child_process_spawnsync_command_args_options) |