Skip to content

Commit

Permalink
docs: restructured the contents of readme (yargs#1082)
Browse files Browse the repository at this point in the history
  • Loading branch information
cg-cnu authored and bcoe committed Mar 4, 2018
1 parent bee18a4 commit 9fd4da4
Showing 1 changed file with 23 additions and 11 deletions.
34 changes: 23 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
# 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]
Expand All @@ -8,13 +15,10 @@
[![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)_.
## Description :
Yargs helps you build interactive command line tools, by parsing arguments and generating an elegant user interface.

> Yargs be a node.js library fer hearties tryin' ter parse optstrings.
<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.
Expand All @@ -30,7 +34,9 @@ Yargs helps you build interactive command line tools, by parsing arguments and g
npm i yargs --save
```

## Simple Example
## Usage :

### Simple Example

````javascript
#!/usr/bin/env node
Expand All @@ -51,9 +57,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) => {
Expand All @@ -75,7 +81,13 @@ require('yargs') // eslint-disable-line

Run the example above with `--help` to see the help for the application.

## Table of Contents
## 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)
Expand Down

0 comments on commit 9fd4da4

Please sign in to comment.