quick-spawn

0.1.2 • Public • Published

Quick-Spawn

中文
ChangeLog: English | 中文

API

You can use this lib just like below:

  import {quickSpawn,quickSpawnPromise} in 'quick-spawn';
  //  or const {quickSpawn,quickSpawnPromise} =require('quick-spawn');

  quickSpawn('command line',callback)
  quickSpawn('command line',params,callback)
  quickSpawn('command line',opts,callback)
  quickSpawn('command line',params, opts,  callback)

  quickSpawnPromise('command line',params(optional), opts(optional))
  .then((err,stdout,stderr)=>{
    if(err) throw err;
    console.log(stdout)
  })  

Command Line

such a string that be executable in terminal or cmd window

params (optional)

Array,which are transfer to program that declared in command line

opts (optional)

Object, declare some parameters for spawn process:

silent:  default is false, control whether the output info will be print on the default output stream
... : other configuration in child_process.spawn

callback

function(err,stdout,stderr){

}

Thank you for these package authors:

easy-spawn
create-spawn
exec-sh

Package Sidebar

Install

npm i quick-spawn

Weekly Downloads

0

Version

0.1.2

License

MIT

Unpacked Size

8.2 kB

Total Files

4

Last publish

Collaborators

  • varlinor