flex-plugins-utils-spawn
TypeScript icon, indicating that this package has built-in type declarations

4.2.1 • Public • Published

npm npm NpmLicense

Flex Plugin Utils Spawn

A simple wrapper for the execa library.

Usage

This library returns 4 methods:

spawn

The default spawn export is for spawning any process.

import spawn from 'flex-plugins-utils-spawn';

const { stdout, exitCode, stderr, stdout } = await spawn('node', ['index.js', '--name', 'test'], options);

node

This is a wrapper that spawns a node process.

import { node } from 'flex-plugins-utils-spawn';

const { stdout, exitCode, stderr, stdout } = await node(['index.js', '--name', 'test'], options);

// This is just a wrapper and is identical to
const { stdout, exitCode, stderr, stdout } = await spawn('node', ['index.js', '--name', 'test'], options);

npm

This is a wrapper that spawns a npm process.

import { npm } from 'flex-plugins-utils-spawn';

const { stdout, exitCode, stderr, stdout } = await npm(['index.js', '--name', 'test'], options);

// This is just a wrapper and is identical to
const { stdout, exitCode, stderr, stdout } = await spawn('npm', ['index.js', '--name', 'test'], options);

yarn

This is a wrapper that spawns a yarn process.

import { yarn } from 'flex-plugins-utils-spawn';

const { stdout, exitCode, stderr, stdout } = await yarn(['index.js', '--name', 'test'], options);

// This is just a wrapper and is identical to
const { stdout, exitCode, stderr, stdout } = await spawn('yarn', ['index.js', '--name', 'test'], options);

Package Sidebar

Install

npm i flex-plugins-utils-spawn

Weekly Downloads

14

Version

4.2.1

License

MIT

Unpacked Size

12.4 kB

Total Files

9

Last publish

Collaborators

  • flex-runtime
  • ktalebian
  • theryankennedy
  • ahcai
  • twilio-labs-ci
  • krishnakalluri
  • alvarezcindy
  • agupt