Skip to content

Commit

Permalink
fix: add CLI docs / usage
Browse files Browse the repository at this point in the history
Signed-off-by: Charlike Mike Reagent <mameto2011@gmail.com>
  • Loading branch information
Charlike Mike Reagent committed Nov 1, 2018
1 parent 5c9b2b7 commit f107f37
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .verb.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,22 @@ _We highly recommend to use Yarn when you think to contribute to this project._
$ yarn add {%= name %}
```

## CLI

For CLI usage install it globally or as devDependency.
To make it work, you should add &lt;!-- docks-start --> and &lt;!-- docks-end --> placeholders
in your existing file or provide non existing file to `--outfile` flag.
If no `--outfile` flag is given, then it will try to search those HTML comments on README.md
and add the API documentation there.

```bash
docks # or docks --outfile docs/API.md
```

Also, by default it collects documentation from all `src/**/*.{js,jsx,ts,tsx}` files,
but you can give another glob pattern. For example run `docks bar/*.js`. Only block comments
with a `@public` tag are collected and used to render the docs.

## API

<!-- docks-start -->
Expand Down
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Project is [semantically](https://semver.org) & automatically released on [Circl

## Table of Contents
- [Install](#install)
- [CLI](#cli)
- [API](#api)
* [src/index.js](#srcindexjs)
+ [docks](#docks)
Expand Down Expand Up @@ -53,6 +54,22 @@ _We highly recommend to use Yarn when you think to contribute to this project._
$ yarn add docks
```

## CLI

For CLI usage install it globally or as devDependency.
To make it work, you should add &lt;!-- docks-start --> and &lt;!-- docks-end --> placeholders
in your existing file or provide non existing file to `--outfile` flag.
If no `--outfile` flag is given, then it will try to search those HTML comments on README.md
and add the API documentation there.

```bash
docks # or docks --outfile docs/API.md
```

Also, by default it collects documentation from all `src/**/*.{js,jsx,ts,tsx}` files,
but you can give another glob pattern. For example run `docks bar/*.js`. Only block comments
with a `@public` tag are collected and used to render the docs.

## API

<!-- docks-start -->
Expand Down

0 comments on commit f107f37

Please sign in to comment.