{"name":"croatia","version":"0.0.0","main":"index.js","license":"MIT","_id":"croatia@0.0.0","_npmVersion":"5.6.0","_nodeVersion":"9.11.0","_npmUser":{"name":"egoist","email":"0x142857@gmail.com"},"dist":{"integrity":"sha512-hsDwcBMr0vy6/IFiUAqXd061D0MJd41/QTH+Z7sKMZW0/Nr+UwOTmCmOw/JQA7EdrTCavrtbIbNje8u0YasDdA==","shasum":"270c493c7e772183f0751a9db1a93c9713f68f9f","tarball":"http://registry-npm.ywwl.com/croatia/download/croatia-0.0.0.tgz","fileCount":1,"unpackedSize":88,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbS1bDCRA9TVsSAnZWagAAXjMP/0xrrMSnWK1CMOEVjeBP\nEvWWguFE3WwdzEczSUKTJrN43WxrQLt3oCGAN5yK70CTbw7RduuujIOjgOOQ\nLFzcGQpJAra6LKEq/F52PSdWsYwGwbzZgdew2RPQTTBqShx+6od0EZRyX8ny\nCl4JvzxHPeLLC/qTJAXqYVM0ZEyasQaRGdywywneRAzFcbDOl8YEo+fuZMah\nonn7A+W3kbnELphCcSlteW8awOAssQE+1LNm5rajraljkk8R6WoiATr+LSXe\nCGQPQA2ZxL/NKOqU4r5cGbKB8KJ9dD6o9STnmK0EtYJrmmDKTJfaSa1ijHgb\nKXO/bzCo6GEQWeoRfTcFmh1upOhojqz2GgSCTnYqGjpi5oKw3AZvTTd7/AeD\ndYjHWXw9zq1AZ83HGwa9EbtnLYHdwYaYPAOz2LL/qpX51itZeEF8S2N4hSgd\nZl0iYLjdHHnL5w24Zxjr6MXnftURCZombiDp6JFU7oOAtl3tsXrawH5TjXoz\nC6dSdMN70FOW4ZG3RCYqrWeGu21XxQfwF0TcixG9GGCmq6DDeNIEW/Mf2W5w\nIJ1dwgxheZkTxMe4iPJMfOyFtjXVkd7pKG7mdl9mGuqJCYfU7W5lq7OwZfM0\nUqfummUT8QS1Rrzp69RtQXf0VVcOxA0LlaCPN4nvi2Ql3wHnZrsq7c9pZDrA\nBpUN\r\n=nNCq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHR1eZ2XU5bmTvViKANrGT/aUzu4RfxDbCgx+filNzLkAiBU93RVf5zT2jDFyNJSP4ydD+FZ6XCwFLjVTUFJCjLOJQ=="}],"size":175,"noattachment":false,"key":"/croatia/-/croatia-0.0.0.tgz"},"maintainers":[{"name":"egoist","email":"0x142857@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/croatia_0.0.0_1531664067013_0.6396934460235546"},"_hasShrinkwrap":false,"readme":"\n# croatia\n\n[![NPM version](https://img.shields.io/npm/v/croatia.svg?style=flat)](https://npmjs.com/package/croatia) [![NPM downloads](https://img.shields.io/npm/dm/croatia.svg?style=flat)](https://npmjs.com/package/croatia) [![travis](https://badgen.net/travis/egoist/croatia/master?a)](https://travis-ci.org/egoist/croatia)  [![donate](https://img.shields.io/badge/$-donate-ff69b4.svg?maxAge=2592000&style=flat)](https://github.com/egoist/donate) [![chat](https://img.shields.io/badge/chat-on%20discord-7289DA.svg?style=flat)](https://chat.egoist.moe)\n\n## Motivation\n\nYou want to clear the output of a child process when it exits without error, otherwise persist the output.\n\n## Install\n\n```bash\nyarn add croatia\n```\n\n## Usage\n\n```js\nconst { spawn } = require('croatia')\n\nspawn('npm', ['install', 'pokemon', '--verbose'])\n```\n\n## Preview\n\nThis preview demonstrates:\n\n- A successful `npm install`, the output will be cleared when succeeded.\n- A failed `yarn install`, the output error will be persisted.\n\n<img src=\"https://cdn.rawgit.com/egoist/63dee59b52f06bd4875c65ed283dd46a/raw/723a35cd0503bac792d93f221983dba0a74179d8/preview-croatia.svg\" width=\"500\" >\n\n## API\n\n### spawn(cmd, [args], [options])\n\nAlmost identical to `child_process.spawn`.\n\nReturns a Promise which resolves to the created child process, the Promise will never be rejected.\n\n#### options\n\nAll options in [child_process.spawn](https://nodejs.org/dist/latest-v10.x/docs/api/child_process.html#child_process_child_process_spawn_command_args_options) are available here, plus:\n\n- `options.stdio` is always `[process.stdin, 'pipe', 'pipe']`\n- `options.banner`: `string` Output a message before the process is spawned.\n\n## Contributing\n\n1. Fork it!\n2. Create your feature branch: `git checkout -b my-new-feature`\n3. Commit your changes: `git commit -am 'Add some feature'`\n4. Push to the branch: `git push origin my-new-feature`\n5. Submit a pull request :D\n\n## Author\n\n**croatia** © [egoist](https://github.com/egoist), Released under the [MIT](./LICENSE) License.<br>\nAuthored and maintained by egoist with help from contributors ([list](https://github.com/egoist/croatia/contributors)).\n\n> [github.com/egoist](https://github.com/egoist) · GitHub [@egoist](https://github.com/egoist) · Twitter [@_egoistlily](https://twitter.com/_egoistlily)\n","publish_time":1531664067277,"_cnpm_publish_time":1531664067277,"dist-tags":{"latest":"1.0.3"}}