{"name":"croatia","version":"1.0.2","description":"Spawn a process and clear its output when succeded.","repository":{"url":"git+https://github.com/egoist/croatia.git","type":"git"},"main":"index.js","scripts":{"test":"npm run lint && echo 'no tests!'","lint":"xo"},"author":{"name":"egoist","email":"0x142857@gmail.com"},"license":"MIT","dependencies":{"cross-spawn":"^6.0.5","strip-ansi":"^4.0.0","wcwidth":"^1.0.1"},"devDependencies":{"eslint-config-rem":"^3.0.0","xo":"^0.18.0"},"xo":{"extends":"rem","ignores":["examples/**"]},"gitHead":"6d9498d3cca61405c0d4b1769e87aac207f04809","bugs":{"url":"https://github.com/egoist/croatia/issues"},"homepage":"https://github.com/egoist/croatia#readme","_id":"croatia@1.0.2","_npmVersion":"5.6.0","_nodeVersion":"9.11.0","_npmUser":{"name":"egoist","email":"0x142857@gmail.com"},"dist":{"integrity":"sha512-335F4XTxELrS9FhglFfwSBH+jmikPteEKO8PiovCcxazlAvGt8KU9HfhCzmuiEFjWNRCFXHAV2EDkInoC8b1bA==","shasum":"10a48848ccd9f3f226d46c7ec296b9ce8a1a449b","tarball":"http://registry-npm.ywwl.com/croatia/download/croatia-1.0.2.tgz","fileCount":4,"unpackedSize":5348,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJblOBZCRA9TVsSAnZWagAApxcQAIWmq3mRM9gUKMTdGBvm\nNiqe1j+eqKdu2Xdi62yxBmbCpHYry5LKr45M1huV7VyGWelhy8YBcVEsOVNo\nYE4kOkpP6n5hfmirR3eb8cTA2FfmLc4FDyFOUBFY/31Mj83klj8BU1oqJvYI\nmeREJ88Ifu/8nXC5U02d6Q4j1F4tAFzpwaA6qt4NY1QxaKIDA0VtXDMqwK/z\nDKB8+msKk/2a55QY+BY62Cy7rYb4bVjfrAWEs3Jewk1q4FIhAvBSKKl3Scss\nFZ2IHbmmP7E2xwnrPE/ZyHdBMoRVKRWN/HTv4VgnTh/giYcZ7GoTzQP4QJOs\nI1vVVvH0cVJO5kPfxkpDFzK0T7SqAFHS1kz+zzJv0OIEj/17j4I1h6XDB48J\njaf3RvBf1v8WMYFebQchjyd1zQEfVF//gc59+105Dgr+b0No6mWuY8iW8mcx\nvo2OpP2Lj1DKBBqvdeH7FQMPWL3z96wMo604IuW3ZaDcq2DUAAmQTCqXk9NX\nl8QT1NO9tP3ngA/TmJsn337NLk7XpJHGRkCnY98+Rr2/b3WQiVwjSHkwp6Lu\n6uwyU/xtnvqinbmQ8pIytGn4BR8mkOTg5D2drWe8qmRMbmhk59a56BgBAr1u\nKsxziPBkwl2cQJ7BlWJliCNgIGqvbtW+XdcR3S475nrNpyh0F3NXkbJhhijF\nf9dR\r\n=Gnx8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDBaN9nyMCmlIQliVApLk6b0Cf1z/uEZrxuap9atrcOhgIhAIURutzU6t2AISVdvRvg2EGMWtpb8ODYQTVzI3QDRDta"}],"size":2754,"noattachment":false,"key":"/croatia/-/croatia-1.0.2.tgz"},"maintainers":[{"name":"egoist","email":"0x142857@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/croatia_1.0.2_1536483416476_0.567355268090795"},"_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":1536483416634,"_cnpm_publish_time":1536483416634,"dist-tags":{"latest":"1.0.3"}}