diff options
author | Florian Dold <florian.dold@gmail.com> | 2017-12-10 21:51:33 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2017-12-10 21:51:33 +0100 |
commit | 0469abd4a9c9270a1fdc962969e36e63699af8b4 (patch) | |
tree | f9864d4a4148621378958794cbbfdc2393733283 /node_modules/yargs/README.md | |
parent | 6947e79bbc258f7bc96af424ddb71a511f0c15a3 (diff) |
upgrade dependencies
Diffstat (limited to 'node_modules/yargs/README.md')
-rw-r--r-- | node_modules/yargs/README.md | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/node_modules/yargs/README.md b/node_modules/yargs/README.md index 867118bfe..84f8fea10 100644 --- a/node_modules/yargs/README.md +++ b/node_modules/yargs/README.md @@ -1,12 +1,19 @@ # Yargs +_Yargs is developed on evenings and weekends by +volunteers. Why not grab them dinner or a drink?_ + +[](https://gratipay.com/yargs/) + [![Build Status][travis-image]][travis-url] [![Coverage Status][coveralls-image]][coveralls-url] [![NPM version][npm-image]][npm-url] [![Windows Tests][windows-image]][windows-url] [![js-standard-style][standard-image]][standard-url] [![Conventional Commits][conventional-commits-image]][conventional-commits-url] -[![Gitter][gitter-image]][gitter-url] +[![Slack][slack-image]][slack-url] + +_Having problems? want to contribute? join our [community slack](http://devtoolscommunity.herokuapp.com)_. > Yargs be a node.js library fer hearties tryin' ter parse optstrings. @@ -53,12 +60,13 @@ Retreat from the xupptumblers! ```js #!/usr/bin/env node -const yargs = require('yargs') // eslint-disable-line - .command('serve', 'start the server', (yargs) => { - yargs.option('port', { - describe: 'port to bind on', - default: 5000 - }) +require('yargs') // eslint-disable-line + .command('serve [port]', 'start the server', (yargs) => { + yargs + .positional('port', { + describe: 'port to bind on', + default: 5000 + }) }, (argv) => { if (argv.verbose) console.info(`start server on :${argv.port}`) serve(argv.port) @@ -67,10 +75,11 @@ const yargs = require('yargs') // eslint-disable-line alias: 'v', default: false }) - .help() .argv ``` +Run the example above with `--help` to see the help for the application. + ## Table of Contents * [Yargs' API](/docs/api.md) @@ -99,5 +108,5 @@ const yargs = require('yargs') // eslint-disable-line [standard-url]: http://standardjs.com/ [conventional-commits-image]: https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg [conventional-commits-url]: https://conventionalcommits.org/ -[gitter-image]: https://img.shields.io/gitter/room/nwjs/nw.js.svg?maxAge=2592000 -[gitter-url]: https://gitter.im/yargs/Lobby?utm_source=share-link&utm_medium=link&utm_campaign=share-link +[slack-image]: http://devtoolscommunity.herokuapp.com/badge.svg +[slack-url]: http://devtoolscommunity.herokuapp.com |