{"name":"croatia","version":"1.0.0","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":"8d7a6b0c9137c68a035ab063b80c11e2cd6ef775","bugs":{"url":"https://github.com/egoist/croatia/issues"},"homepage":"https://github.com/egoist/croatia#readme","_id":"croatia@1.0.0","_npmVersion":"5.6.0","_nodeVersion":"9.11.0","_npmUser":{"name":"egoist","email":"0x142857@gmail.com"},"dist":{"integrity":"sha512-xbJ3SSQmMa+XUTZLzzHm8epBua4Wlq8V5Vgu31rr26FNJ2GfjX3GtzTHZicU66fOKKCu/TAM8UL0RIfXJmf9fQ==","shasum":"493e8824984c8283f96f49c6d071ba6a97f98334","tarball":"http://registry-npm.ywwl.com/croatia/download/croatia-1.0.0.tgz","fileCount":4,"unpackedSize":4903,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJblNZdCRA9TVsSAnZWagAAjmkP/3AVKcVe/0Ap9A6qRntQ\n7ohfiWWu1f8lLlfjqddZlTIhaiU3hgdfcJMsjb8+w82EtHG6plWrB83NMEu2\nwoGlWlb6evRGvE/sDXnApFDr2UoubaTHET3SJnCbhscRpdT6uQmnDjV4BRm8\n8C4DGqXXa5gTZmv4wUPKSHxyYU6vjkDV12FUEoViQ9qDwz4By0T5yY026eZx\nndosXSivxr9Bxg/n/Oa3EOGrhK4hueAKV0JQnwbSYcNjNlsUp1RbmWv+YHEq\n3XD5F3EqUxv40AA8eBtgLk7VOKicEkhUz6TgwbLZCKLzCJpjvwSVpjBsO2sA\nrSsnvBXWS8Pli9GKEPTIL9n/Ij+lBkaA4x0epwemmGK2r1AA3XwIkoGpmXJY\nc3ZIkSd9Mib1rr8r+jcRQCmbsMOeHPSqDRozGAteMLwsvXwAxt0aLC3UMYfo\nRoPuC19FBz44PllZO3CqvoLzTwBjyOcv1z3acvgfY3Fy6qUpmoXW6mvozZ52\n0z7qx8yTCjyJ4LRZADuEK6/vyKuMVSmHwboR4k8edH3E15j5uJ4Iy7z4vGXs\nHOGTwC243Su0aVPv0WEYbwohRBD99mbXxHXKxSRRBlTTFt3MrkXIKI07wBM/\ni/7z5jim1rddoMviYrIxrP3Qj/3n9em4KPDDFUb1nJPKiefUP+DU6iF+4T3c\n9UaF\r\n=jq2a\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDB8si8Edv5KWaKP4Q6BiMUDXOc9dsIQ6CK5fNeMGzcBgIgEyACRX1uqgV1Xvf0WwADCiMSKGreo1jR4ZmZUHwp3ns="}],"size":2576,"noattachment":false,"key":"/croatia/-/croatia-1.0.0.tgz"},"maintainers":[{"name":"egoist","email":"0x142857@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/croatia_1.0.0_1536480860408_0.51385561996547"},"_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":1536480860590,"_cnpm_publish_time":1536480860590,"dist-tags":{"latest":"1.0.3"}}