Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/yargs/README.md')
-rw-r--r--node_modules/yargs/README.md61
1 files changed, 45 insertions, 16 deletions
diff --git a/node_modules/yargs/README.md b/node_modules/yargs/README.md
index d16b82d17..679a3eeea 100644
--- a/node_modules/yargs/README.md
+++ b/node_modules/yargs/README.md
@@ -1,20 +1,24 @@
-# Yargs
+<p align="center">
+ <img width="250" src="/yargs-logo.png">
+</p>
+<h1 align="center"> Yargs </h1>
+<p align="center">
+ <b >Yargs be a node.js library fer hearties tryin' ter parse optstrings</b>
+</p>
+
+<br>
[![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]
[![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.
+## Description :
+Yargs helps you build interactive command line tools, by parsing arguments and generating an elegant user interface.
-<img width="250" src="/yargs-logo.png">
-
-Yargs helps you build interactive command line tools, by parsing arguments and generating an elegant user interface. It gives you:
+It gives you:
* commands and (grouped) options (`my-program.js serve --port=5000`).
* a dynamically generated help menu based on your arguments.
@@ -26,11 +30,19 @@ Yargs helps you build interactive command line tools, by parsing arguments and g
## Installation
+Stable version:
+```bash
+npm i yargs
+```
+
+Bleeding edge version with the most recent features:
```bash
-npm i yargs --save
+npm i yargs@next
```
-## Simple Example
+## Usage :
+
+### Simple Example
````javascript
#!/usr/bin/env node
@@ -51,9 +63,9 @@ $ ./plunder.js --ships 12 --distance 98.7
Retreat from the xupptumblers!
```
-## Complex Example
+### Complex Example
-```js
+```javascript
#!/usr/bin/env node
require('yargs') // eslint-disable-line
.command('serve [port]', 'start the server', (yargs) => {
@@ -68,14 +80,31 @@ require('yargs') // eslint-disable-line
})
.option('verbose', {
alias: 'v',
- default: false
+ type: 'boolean',
+ description: 'Run with verbose logging'
})
.argv
```
Run the example above with `--help` to see the help for the application.
-## Table of Contents
+## TypeScript
+
+yargs has type definitions at [@types/yargs][type-definitions].
+
+```
+npm i @types/yargs --save-dev
+```
+
+See usage examples in [docs](/docs/typescript.md).
+
+## Community :
+
+Having problems? want to contribute? join our [community slack](http://devtoolscommunity.herokuapp.com).
+
+## Documentation :
+
+### Table of Contents
* [Yargs' API](/docs/api.md)
* [Examples](/docs/examples.md)
@@ -85,6 +114,7 @@ Run the example above with `--help` to see the help for the application.
* [Numbers](/docs/tricks.md#numbers)
* [Arrays](/docs/tricks.md#arrays)
* [Objects](/docs/tricks.md#objects)
+ * [Quotes](/docs/tricks.md#quotes)
* [Advanced Topics](/docs/advanced.md)
* [Composing Your App Using Commands](/docs/advanced.md#commands)
* [Building Configurable CLI Apps](/docs/advanced.md#configuration)
@@ -97,11 +127,10 @@ Run the example above with `--help` to see the help for the application.
[coveralls-image]: https://img.shields.io/coveralls/yargs/yargs.svg
[npm-url]: https://www.npmjs.com/package/yargs
[npm-image]: https://img.shields.io/npm/v/yargs.svg
-[windows-url]: https://ci.appveyor.com/project/bcoe/yargs-ljwvf
-[windows-image]: https://img.shields.io/appveyor/ci/bcoe/yargs-ljwvf/master.svg?label=Windows%20Tests
[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg
[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/
[slack-image]: http://devtoolscommunity.herokuapp.com/badge.svg
[slack-url]: http://devtoolscommunity.herokuapp.com
+[type-definitions]: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/yargs