{"name":"croatia","version":"1.0.3","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":"f24a101503e0e1d15e9bcf9d6e8d019bd6f0e530","bugs":{"url":"https://github.com/egoist/croatia/issues"},"homepage":"https://github.com/egoist/croatia#readme","_id":"croatia@1.0.3","_npmVersion":"5.6.0","_nodeVersion":"9.11.0","_npmUser":{"name":"egoist","email":"0x142857@gmail.com"},"dist":{"integrity":"sha512-/WBOPXdkPiZrbncsUH0dDunMt+fHeRLSsdKc7x4Il4QFJp6HR1tEPMKsTze3snJQVRxdQ3n63SWCM06ht45W3w==","shasum":"8214e6ec0458977b78252fac0f055f2212bbeb8d","tarball":"http://registry-npm.ywwl.com/croatia/download/croatia-1.0.3.tgz","fileCount":4,"unpackedSize":5413,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJblOQaCRA9TVsSAnZWagAATLQP/3Wpzi8d3/zJ6xIvGuTv\ntImVyafhK4EK8CFf6GDVVT6veLCddUsD7IJHcAsqwYr6h7cTF9CqCw8kK9ic\nImrqX+aSTAGA9VRiMo/y+kRGwzEhUBH8AnxKikns46+zrpJTmC5t2u77Tmtn\n1pk1lMdf87C0718ZAF6RKYOkUeyuGyoG50jAsCVb0aisy1rzT+WyeNJc4STV\n7BzLv9uWKBrj7jN0eSSWWYqGE9o5NENas+ZwikHnRarDXxsjiiFERGkAvz1r\nNlmS/qaexXFYflSyOfqC/sKqTqEumQm/MmzyIjHtvQ36k5rtKeVWFqXPYJOB\nW2RVsP8LuPCtKsIzfX4vXs1w3L0pmowpG3EwZDYqZzSX7l22m1xOZquWWqri\n/AoTSSC3NNGhM+u7XUkYKKuqmMKi3rMbZ6rkyBfbUEhPMiMwucw6j5Q5rZVB\njsY2iHI0tddR9mSsWNrGFjGYwfYgMhXbldPP7chVrHSoojnVDYyM3bTWoH5Z\n0230Ad0hJS+paRz2AxrTzVasGHA6x2IgJkOr4CturB36PLQoiTPKka+XDeu5\n46ZpKtBjhvV5u8vmtnjta+mMDlDoqgNhUUjDBb/gW0+R4lPCItSeHTySz2J/\n0Lz6rHS+ZtIDY28NEot6uP8ctWemCL5mvjTJoI5JqLvdlKusmutAWQaCYP5b\nBEo7\r\n=TAsy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHCsQUVkHtSB/tdGMtgsCaHS8939otg3xsLjDO0Bxi2/AiAdc1npIK4TDvt1yvl0sjB+eDiqi5paGHUnaBXosZJGJA=="}],"size":2764,"noattachment":false,"key":"/croatia/-/croatia-1.0.3.tgz"},"maintainers":[{"name":"egoist","email":"0x142857@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/croatia_1.0.3_1536484377788_0.8094236977516336"},"_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":1536484377911,"_cnpm_publish_time":1536484377911,"dist-tags":{"latest":"1.0.3"}}