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

Latest commit

 

History

History
52 lines (35 loc) · 1.4 KB

readme.md

File metadata and controls

52 lines (35 loc) · 1.4 KB

🐣 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'])