{"name":"command-line-tool","author":{"name":"Lloyd Brookes","email":"75pound@gmail.com"},"version":"0.6.4","description":"command-line-tool","repository":{"type":"git","url":"git+https://github.com/75lb/command-line-tool.git"},"license":"MIT","main":"index","keywords":[],"engines":{"node":">=0.10.0"},"scripts":{"test":"test-runner test/*.js","docs":"jsdoc2md -t jsdoc2md/README.hbs lib/*.js > README.md; echo","es5":"babel --presets babel-preset-es2015 --no-comments lib --out-dir es5"},"dependencies":{"ansi-escape-sequences":"^3.0.0","array-back":"^1.0.3","command-line-args":"^3.0.1","command-line-usage":"^3.0.3","feature-detect-es6":"^1.3.1","typical":"^2.6.0"},"devDependencies":{"babel-preset-es2015":"^6.16.0","core-assert":"^0.2.1","jsdoc-to-markdown":"^1.3.7","test-runner":"^0.2.4"},"standard":{"ignore":["es5"]},"gitHead":"7adb6f4e24e5dac647f770f54b5b016eca8df5ea","bugs":{"url":"https://github.com/75lb/command-line-tool/issues"},"homepage":"https://github.com/75lb/command-line-tool#readme","_id":"command-line-tool@0.6.4","_shasum":"4c11e372f3e41254861c3fe6b538d3c7a5b144f3","_from":".","_npmVersion":"3.10.7","_nodeVersion":"6.7.0","_npmUser":{"name":"75lb","email":"75pound@gmail.com"},"dist":{"shasum":"4c11e372f3e41254861c3fe6b538d3c7a5b144f3","tarball":"http://registry-npm.ywwl.com/command-line-tool/download/command-line-tool-0.6.4.tgz","integrity":"sha512-SEu+5BWiZwQuL6vw1Qqk7bZ26kM0LmqlNP5QaPPEHg7GDH5mYznVDdUlpiDBUozocwJSWRLAjW3rJsWZP7Jr5w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDvvKQpwyGIaHCblsyl7bRxuYDuA7hQyDFJDhGx16ga/AiEAqoaJLZVDy9N/hQ7YofxEqEK6Zm/NjVHNbjiTuFajd1k="}],"size":3569,"noattachment":false,"key":"/command-line-tool/-/command-line-tool-0.6.4.tgz"},"maintainers":[{"name":"75lb","email":"75pound@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/command-line-tool-0.6.4.tgz_1475780666279_0.4073653968516737"},"directories":{},"readme":"[![view on npm](http://img.shields.io/npm/v/command-line-tool.svg)](https://www.npmjs.org/package/command-line-tool)\n[![npm module downloads](http://img.shields.io/npm/dt/command-line-tool.svg)](https://www.npmjs.org/package/command-line-tool)\n[![Build Status](https://travis-ci.org/75lb/command-line-tool.svg?branch=master)](https://travis-ci.org/75lb/command-line-tool)\n[![Dependency Status](https://david-dm.org/75lb/command-line-tool.svg)](https://david-dm.org/75lb/command-line-tool)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](https://github.com/feross/standard)\n\n<a name=\"module_command-line-tool\"></a>\n\n## command-line-tool\nSome conventional operations used in command-line tools.\n\n**Example**  \n```js\nconst tool = require('command-line-tool')\n```\n\n* [command-line-tool](#module_command-line-tool)\n    * [.stop([message])](#module_command-line-tool.stop)\n    * [.printError(message)](#module_command-line-tool.printError)\n    * [.printOutput(message)](#module_command-line-tool.printOutput)\n    * [.halt([err], [options])](#module_command-line-tool.halt)\n    * [.getCli(definitions, [usageSections], [argv])](#module_command-line-tool.getCli) ⇒ <code>object</code>\n\n<a name=\"module_command-line-tool.stop\"></a>\n\n### tool.stop([message])\nPrint the supplied messages then stop the process (no exit code).\n\n**Kind**: static method of <code>[command-line-tool](#module_command-line-tool)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| [message] | <code>string</code> &#124; <code>Array.&lt;string&gt;</code> | One or more messages to be written to stderr before exiting. May contain `ansi.format` markup. |\n\n<a name=\"module_command-line-tool.printError\"></a>\n\n### tool.printError(message)\nPrints one or more strings in red to stderr.\n\n**Kind**: static method of <code>[command-line-tool](#module_command-line-tool)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| message | <code>string</code> &#124; <code>Array.&lt;string&gt;</code> | input message(s) |\n\n<a name=\"module_command-line-tool.printOutput\"></a>\n\n### tool.printOutput(message)\nPrints one or more strings to stdout. Catches unwanted EPIPE error.\n\n**Kind**: static method of <code>[command-line-tool](#module_command-line-tool)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| message | <code>string</code> &#124; <code>Array.&lt;string&gt;</code> | input message(s) |\n\n<a name=\"module_command-line-tool.halt\"></a>\n\n### tool.halt([err], [options])\nStop the process with an error message.\n\n**Kind**: static method of <code>[command-line-tool](#module_command-line-tool)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| [err] | <code>Error</code> | the error instance |\n| [options] | <code>object</code> |  |\n| [options.exitCode] | <code>number</code> | defaults to 1 |\n| [options.stack] | <code>boolean</code> | defaults to false |\n\n<a name=\"module_command-line-tool.getCli\"></a>\n\n### tool.getCli(definitions, [usageSections], [argv]) ⇒ <code>object</code>\nParse the command-line options.\n\n**Kind**: static method of <code>[command-line-tool](#module_command-line-tool)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| definitions | <code>Array.&lt;OptionDefinitions&gt;</code> | to be passed to command-line-args |\n| [usageSections] | <code>Array.&lt;section&gt;</code> | to be passed to command-line-usage |\n| [argv] | <code>Array.&lt;string&gt;</code> | If supplied, this `argv` array is parsed instead of `process.argv`. |\n\n\n* * *\n\n&copy; 2015-18 Lloyd Brookes \\<75pound@gmail.com\\>. Documented by [jsdoc-to-markdown](https://github.com/jsdoc2md/jsdoc-to-markdown).\n","publish_time":1475780668875,"_cnpm_publish_time":1475780668875,"dist-tags":{"latest":"0.8.0"}}