{"name":"command-line-tool","author":{"name":"Lloyd Brookes","email":"75pound@gmail.com"},"version":"0.7.0","description":"command-line-tool","repository":{"type":"git","url":"git+https://github.com/75lb/command-line-tool.git"},"license":"MIT","main":"lib/command-line-tool.js","keywords":[],"engines":{"node":">=4.0.0"},"scripts":{"test":"test-runner test/*.js","docs":"jsdoc2md -t jsdoc2md/README.hbs lib/*.js > README.md; echo"},"dependencies":{"ansi-escape-sequences":"^3.0.0","array-back":"^1.0.4","command-line-args":"^4.0.1","command-line-usage":"^4.0.0","typical":"^2.6.0"},"devDependencies":{"jsdoc-to-markdown":"^2.0.1","test-runner":"^0.3.0"},"gitHead":"7c4c520ed87c04808c8c6b6f2ef96c2406d3f215","bugs":{"url":"https://github.com/75lb/command-line-tool/issues"},"homepage":"https://github.com/75lb/command-line-tool#readme","_id":"command-line-tool@0.7.0","_shasum":"ca80792ae2069cf7caa562c0cbc2cd11811122a0","_from":".","_npmVersion":"4.1.2","_nodeVersion":"7.5.0","_npmUser":{"name":"75lb","email":"75pound@gmail.com"},"dist":{"shasum":"ca80792ae2069cf7caa562c0cbc2cd11811122a0","tarball":"http://registry-npm.ywwl.com/command-line-tool/download/command-line-tool-0.7.0.tgz","integrity":"sha512-1cgvcjyYX8HoVbv6fenDL5deA4jcHhWtx08toZyl3dykNlm5GF1ZLyNPkI6OCunXtS+h7mc6gErkDbARNVK6uQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC4xvgvIbnpzF8jjQ7kCwMcFfmO/Cufn6ZYpIz4ro2V4gIhAMpPl96JFz1ofppA1dgY5+sNjqNOAGPdIySaJwYhNpYF"}],"size":3134,"noattachment":false,"key":"/command-line-tool/-/command-line-tool-0.7.0.tgz"},"maintainers":[{"name":"75lb","email":"75pound@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/command-line-tool-0.7.0.tgz_1486581653846_0.0847604083828628"},"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":1486581655736,"_cnpm_publish_time":1486581655736,"dist-tags":{"latest":"0.8.0"}}