@fujia/spawn
v1.0.1
Published
An easy-to-use spawn function of node.js
Downloads
3
Readme
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();