$ npm install croatia
You want to clear the output of a child process when it exits without error, otherwise persist the output.
yarn add croatia
const { spawn } = require('croatia')
spawn('npm', ['install', 'pokemon', '--verbose'])
This preview demonstrates:
npm install, the output will be cleared when succeeded.yarn install, the output error will be persisted.Almost identical to child_process.spawn.
Returns a Promise which resolves to the created child process, the Promise will never be rejected.
All options in child_process.spawn are available here, plus:
options.stdio is always [process.stdin, 'pipe', 'pipe']options.banner: string Output a message before the process is spawned.git checkout -b my-new-featuregit commit -am 'Add some feature'git push origin my-new-featurecroatia © egoist, Released under the MIT License.
Authored and maintained by egoist with help from contributors (list).
github.com/egoist · GitHub @egoist · Twitter @_egoistlily
© 2010 - cnpmjs.org x YWFE | Home | YWFE