1.0.3 • Published 6 years ago

croatia v1.0.3

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

croatia

NPM version NPM downloads travis donate chat

Motivation

You want to clear the output of a child process when it exits without error, otherwise persist the output.

Install

yarn add croatia

Usage

const { spawn } = require('croatia')

spawn('npm', ['install', 'pokemon', '--verbose'])

Preview

This preview demonstrates:

  • A successful npm install, the output will be cleared when succeeded.
  • A failed yarn install, the output error will be persisted.

API

spawn(cmd, args, options)

Almost identical to child_process.spawn.

Returns a Promise which resolves to the created child process, the Promise will never be rejected.

options

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.

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Author

croatia © egoist, Released under the MIT License. Authored and maintained by egoist with help from contributors (list).

github.com/egoist · GitHub @egoist · Twitter @_egoistlily

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago

0.0.0

6 years ago