Skip to content
This repository has been archived by the owner on Mar 27, 2020. It is now read-only.

Latest commit

 

History

History

plugin-spawn

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

🐣 plugin-spawn

npm linux windows coverage deps

Spawn new child process.

Install

$ yarn add --dev @start/plugin-spawn
# or
$ npm install --save-dev @start/plugin-spawn

Usage

Signature

spawn(cli: string[], options?: {})

cli

Array of CLI command and args, for example ['node', '--version'].

options

execa options.

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.

Example

import spawn from '@start/plugin-spawn'

export task = () => spawn(['node', '--version'])