@fujia/spawn
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

@fujia/spawn

An easy-to-use spawn function of node.js.

English | 简体中文

Installing

Using npm:

npm install @fujia/spawn

Using yarn:

yarn add @fujia/spawn

Usage

Simply to use, as follows:

import { spawn, spawnAsync } from '@fujia/spawn';

spawn('npm', ['get', 'registry'], {
  stdio: 'inherit',
  shell: true,
});

async function getNpmRegistry() {
  const code = await spawnAsync('npm', ['get', 'registry'], {
    stdio: 'inherit',
    shell: true,
  });

  console.log('exec code', code);
}

getNpmRegistry();

References

  1. child_process.

Readme

Keywords

Package Sidebar

Install

npm i @fujia/spawn

Weekly Downloads

2

Version

1.0.1

License

MIT

Unpacked Size

6.08 kB

Total Files

7

Last publish

Collaborators

  • sunnyfu