{"name":"croatia","version":"1.0.1","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":"4a3b4fe211f904b6ff60803037f3c8462e1df202","bugs":{"url":"https://github.com/egoist/croatia/issues"},"homepage":"https://github.com/egoist/croatia#readme","_id":"croatia@1.0.1","_npmVersion":"5.6.0","_nodeVersion":"9.11.0","_npmUser":{"name":"egoist","email":"0x142857@gmail.com"},"dist":{"integrity":"sha512-nwrEtBf6RI7aKdllheqHBqkWDG8yvfrBZmFehzIcizzkj2TuTN7bhzmJIj1iwZtHuDvuPgQyxVoutyzhYRI9lg==","shasum":"497c770cafb958ac98d6f8f0c84d348793434ade","tarball":"http://registry-npm.ywwl.com/croatia/download/croatia-1.0.1.tgz","fileCount":4,"unpackedSize":5358,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJblN6yCRA9TVsSAnZWagAADcQQAIuaCaOgJFR7fFDYOAOi\n7BI7lbZP198Vm+8dtljzVUX35bmTnYowXjS2dCI2lQAzN7Q9lZMiuUtFTH30\nhrCyWK9mVPfE28ICr87hqfRziCnhqT4PBuGrO7LARKBh0xODiugbsCvyJy4L\ntDlZeg4mNmZCzUMrCFBApeimgXaivoeGlJh4cI8VM0Qe/7jhgbl2QPF7sdnu\nlmCWD1t/Qk0q5143JyEy3FeJ8sz70Qsyv9oMa5UUwxyzMl1PndM8XPrtrpFy\nTuINiTjJzYJfWnBaojCs7ls8+gAB3uAd2X3slcv7YMHsnC1GFbvuwRuazxSz\nWnFFjR9LE/epIn8g0tKSQ36kq9LkIdVjYyxzLbKzflIP2Z1qgc5fojHrR1Ci\nxI8eYKMx9euTR9/uXI7yvCfxZUanXb2OJzvAPIaAUvzmVSIvNaurQJOTzqmU\nlS1SpgstIeYZlEzop72K2autaS17njF3VDDsiOXMlSFfpyrgGNEpkOuSIBxf\nUXCKKArTPmrpNmFk4mR2vcZ9rEhclrFupK2N1a3gvtwDpaBWOoDCrN/ZfT5i\n9NqnNJD81wr35Jp0SKTfIPzGduE60av5GPlfKl+/pSkTlMgdy6fKPFHybVgs\nAuN2eCz89dfVBXt3D6ZXZrjAoIEUl2r+DLSnM3N/Jspf+HNVepwNB+ZsDy9y\nQuo8\r\n=CPu5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDg/88vqomgU0Vvu3EiVAEK/xxG5/SFLr6AZrLPZNhszgIgUMYvW/Pt8+iDoJQ5AWm1VaBT03aM2z7L4ODqNgfkJkI="}],"size":2759,"noattachment":false,"key":"/croatia/-/croatia-1.0.1.tgz"},"maintainers":[{"name":"egoist","email":"0x142857@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/croatia_1.0.1_1536482993994_0.3766192917998257"},"_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":1536482994148,"_cnpm_publish_time":1536482994148,"dist-tags":{"latest":"1.0.3"}}