Spawn new child process.
$ yarn add --dev @start/plugin-spawn
# or
$ npm install --save-dev @start/plugin-spawn
spawn(cli: string[], options?: {})
Array of CLI command and args, for example ['node', '--version']
.
Default:
{
stdout: process.stdout,
stderr: process.stderr,
stripEof: false,
env: {
FORCE_COLOR: '1'
}
}
If there is no stderr
then error will be shown using Start reporter.
import spawn from '@start/plugin-spawn'
export task = () => spawn(['node', '--version'])