{"name":"command-line-tool","author":{"name":"Lloyd Brookes","email":"75pound@gmail.com"},"version":"0.5.2","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":"tape 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":"^2.2.2","array-back":"^1.0.3","command-line-args":"^3.0.0","command-line-usage":"^3.0.3","feature-detect-es6":"^1.3.0","typical":"^2.4.2"},"devDependencies":{"babel-preset-es2015":"^6.9.0","jsdoc-to-markdown":"^1.3.6","tape":"^4.6.0"},"standard":{"ignore":["es5"]},"gitHead":"e07a9e0c4424ac2ec4046021701d86425e4a8fb1","bugs":{"url":"https://github.com/75lb/command-line-tool/issues"},"homepage":"https://github.com/75lb/command-line-tool#readme","_id":"command-line-tool@0.5.2","_shasum":"f87d6977f56bbdd2d5dfcf946345dd2cd9c6a53a","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.3.1","_npmUser":{"name":"75lb","email":"75pound@gmail.com"},"dist":{"shasum":"f87d6977f56bbdd2d5dfcf946345dd2cd9c6a53a","tarball":"http://registry-npm.ywwl.com/command-line-tool/download/command-line-tool-0.5.2.tgz","integrity":"sha512-TiZWqiRiyG4M6ZwbxKiCnBMDrD+rMNLeV2rf3rjmRH6O1yKvVmRpXlVxprABqks0nI/NU5F5JOCC14XQBFddlw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCY00EuDyFCWlNjx4yX6qOi4Hvu7Cn4cRZ0GYQ46lMHXAIgZwu/QUT6m1tnOVXbGqwcr+MPQIq+mU+BmgyeGX/M+bQ="}],"size":3823,"noattachment":false,"key":"/command-line-tool/-/command-line-tool-0.5.2.tgz"},"maintainers":[{"name":"75lb","email":"75pound@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/command-line-tool-0.5.2.tgz_1469647942824_0.4155521006323397"},"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":1469647944833,"_cnpm_publish_time":1469647944833,"dist-tags":{"latest":"0.8.0"}}