UNPKG

motion

Version:

motion - moving development forward

96 lines (95 loc) 6.19 kB
{ "_args": [ [ "meow@https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", "/Users/nw/flint/packages/flint" ] ], "_from": "meow@>=3.3.0 <4.0.0", "_id": "meow@3.7.0", "_inCache": true, "_location": "/meow", "_phantomChildren": {}, "_requested": { "name": "meow", "raw": "meow@https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", "rawSpec": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", "scope": null, "spec": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", "type": "remote" }, "_requiredBy": [ "/dateformat" ], "_resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", "_shasum": "72cb668b425228290abbfa856892587308a801fb", "_shrinkwrap": null, "_spec": "meow@https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", "_where": "/Users/nw/flint/packages/flint", "author": { "email": "sindresorhus@gmail.com", "name": "Sindre Sorhus", "url": "sindresorhus.com" }, "bugs": { "url": "https://github.com/sindresorhus/meow/issues" }, "dependencies": { "camelcase-keys": "^2.0.0", "decamelize": "^1.1.2", "loud-rejection": "^1.0.0", "map-obj": "^1.0.1", "minimist": "^1.1.3", "normalize-package-data": "^2.3.4", "object-assign": "^4.0.1", "read-pkg-up": "^1.0.1", "redent": "^1.0.0", "trim-newlines": "^1.0.0" }, "description": "CLI app helper", "devDependencies": { "ava": "*", "execa": "^0.1.1", "indent-string": "^2.1.0", "xo": "*" }, "engines": { "node": ">=0.10.0" }, "files": [ "index.js" ], "homepage": "https://github.com/sindresorhus/meow#readme", "keywords": [ "argv", "bin", "cat", "cli", "cmd", "command", "console", "flags", "helper", "input", "kitten", "line", "meow", "option", "parser", "util", "utility" ], "license": "MIT", "name": "meow", "optionalDependencies": {}, "readme": "# meow [![Build Status](https://travis-ci.org/sindresorhus/meow.svg?branch=master)](https://travis-ci.org/sindresorhus/meow)\n\n> CLI app helper\n\n![](meow.gif)\n\n\n## Features\n\n- Parses arguments using [minimist](https://github.com/substack/minimist)\n- Converts flags to [camelCase](https://github.com/sindresorhus/camelcase)\n- Outputs version when `--version`\n- Outputs description and supplied help text when `--help`\n- Makes unhandled rejected promises [fail loudly](https://github.com/sindresorhus/loud-rejection) instead of the default silent fail\n- Sets the process title to the binary name defined in package.json\n\n\n## Install\n\n```\n$ npm install --save meow\n```\n\n\n## Usage\n\n```\n$ ./foo-app.js unicorns --rainbow-cake\n```\n\n```js\n#!/usr/bin/env node\n'use strict';\nconst meow = require('meow');\nconst foo = require('./');\n\nconst cli = meow(`\n\tUsage\n\t $ foo <input>\n\n\tOptions\n\t -r, --rainbow Include a rainbow\n\n\tExamples\n\t $ foo unicorns --rainbow\n\t 🌈 unicorns 🌈\n`, {\n\talias: {\n\t\tr: 'rainbow'\n\t}\n});\n/*\n{\n\tinput: ['unicorns'],\n\tflags: {rainbow: true},\n\t...\n}\n*/\n\nfoo(cli.input[0], cli.flags);\n```\n\n\n## API\n\n### meow(options, [minimistOptions])\n\nReturns an object with:\n\n- `input` *(array)* - Non-flag arguments\n- `flags` *(object)* - Flags converted to camelCase\n- `pkg` *(object)* - The `package.json` object\n- `help` *(object)* - The help text used with `--help`\n- `showHelp([code=0])` *(function)* - Show the help text and exit with `code`\n\n#### options\n\nType: `object`, `array`, `string`\n\nCan either be a string/array that is the `help` or an options object.\n\n##### description\n\nType: `string`, `boolean`\nDefault: The package.json `\"description\"` property\n\nA description to show above the help text.\n\nSet it to `false` to disable it altogether.\n\n##### help\n\nType: `string`, `boolean`\n\nThe help text you want shown.\n\nThe input is reindented and starting/ending newlines are trimmed which means you can use a [template literal](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/template_strings) without having to care about using the correct amount of indent.\n\n<del>If it's an array each item will be a line.</del> \n*(Still supported, but you should use a template literal instead.)*\n\nThe description will be shown above your help text automatically.\n\nSet it to `false` to disable it altogether.\n\n##### version\n\nType: `string`, `boolean` \nDefault: The package.json `\"version\"` property\n\nSet a custom version output.\n\nSet it to `false` to disable it altogether.\n\n##### pkg\n\nType: `string`, `object` \nDefault: Closest package.json upwards\n\nRelative path to package.json or as an object.\n\n##### argv\n\nType: `array` \nDefault: `process.argv.slice(2)`\n\nCustom arguments object.\n\n#### minimistOptions\n\nType: `object` \nDefault: `{}`\n\nMinimist [options](https://github.com/substack/minimist#var-argv--parseargsargs-opts).\n\nKeys passed to the minimist `default` option are [decamelized](https://github.com/sindresorhus/decamelize), so you can for example pass in `fooBar: 'baz'` and have it be the default for the `--foo-bar` flag.\n\n\n## Promises\n\nMeow will make unhandled rejected promises [fail loudly](https://github.com/sindresorhus/loud-rejection) instead of the default silent fail. Meaning you don't have to manually `.catch()` promises used in your CLI.\n\n\n## Tips\n\nSee [`chalk`](https://github.com/chalk/chalk) if you want to colorize the terminal output.\n\nSee [`get-stdin`](https://github.com/sindresorhus/get-stdin) if you want to accept input from stdin.\n\nSee [`update-notifier`](https://github.com/yeoman/update-notifier) if you want update notifications.\n\nSee [`configstore`](https://github.com/yeoman/configstore) if you need to persist some data.\n\n[More useful CLI utilities.](https://github.com/sindresorhus/awesome-nodejs#command-line-utilities)\n\n\n## License\n\nMIT © [Sindre Sorhus](http://sindresorhus.com)\n", "readmeFilename": "readme.md", "repository": { "type": "git", "url": "git+https://github.com/sindresorhus/meow.git" }, "scripts": { "test": "xo && ava" }, "version": "3.7.0" }