# @microfleet/mdoc

> The CLI tool that Generates documentation in Markdown from `apidoc` generated data.

Latest version **0.1.4** (published 2020-09-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install @microfleet/mdoc
pnpm add @microfleet/mdoc
yarn add @microfleet/mdoc
bun add @microfleet/mdoc
```

Provides the command `mdoc-markdown`.

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: no vulnerabilities; high maintenance score.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.1.4 |
| Published | 2020-09-17 |
| First published | 2020-09-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 7 |
| Unpacked size | 27.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Vitaly Aminev |
| Maintainers | torinasakura, avvs |

## Links

- npm: https://www.npmjs.com/package/@microfleet/mdoc
- Repository: https://github.com/microfleet/docgen
- Homepage: https://github.com/microfleet/docgen/#readme
- Issues: https://github.com/microfleet/docgen/issues
- npm.io page: https://npm.io/package/@microfleet/mdoc

## Dependencies (7)

- [yargs](https://npm.io/package/yargs.md) ^16.0.3
- [find-up](https://npm.io/package/find-up.md) ^5.0.0
- [read-pkg](https://npm.io/package/read-pkg.md) ^5.2.0
- [log-update](https://npm.io/package/log-update.md) ^4.0.0
- [apidoc-markdown](https://npm.io/package/apidoc-markdown.md) ^5.1.6
- [@microfleet/schema2md](https://npm.io/package/@microfleet/schema2md.md) ^0.1.3
- [@microfleet/schema-tools](https://npm.io/package/@microfleet/schema-tools.md) ^0.1.3

## Recent versions

- 0.1.4 (latest) — 2020-09-17
- 0.1.3 — 2020-09-17

## README

# Apidoc Markdown generator

The CLI tool that Generates documentation in Markdown from `apidoc` generated data.

## Install
`yarn add @microfleet/mdoc`


## Usage

```console
Usage: mdoc-markdown -p <path> -o <output_file> [-t <template_path>] [--multi] [--createPath] [--prepend <file_path>]

Options:
  --version         Show version number                                                                                  [boolean]
  --apiDocPath, -p  Path to generated apiDoc output directory. Where `api_data.json` and `api_project.json` resides.
                                                                                                               [string] [required]
  --output, -o      Output file or directory to write output to.                                               [string] [required]
  --template, -t    Path to EJS template file, if not specified default template will be used.
                                [string] [default: "/Users/pajgo/work/pajgo/microfleet_docgen/packages/mdoc/template/default.ejs"]
  --prepend         Path to file content to add before route groups documentation.                                        [string]
  --multi           Output one file per group to the `output` directory.                                [boolean] [default: false]
  --createPath      Recursively create directory to the `output` directory.                [boolean] [default: false]
  -h, --help        Show help                                                                                            [boolean]

Examples:
  mdoc-markdown -p doc/ -o doc.md                     Generate from `doc/` apiDoc output to `./doc.md`
  mdoc-markdown -p doc -o multi --multi --createPath  Generate from `doc/` apiDoc output to `./multi/<group>.md`
```

## Configuration
Cli arguments are read from: `.mdocrc.js`, `.mdocrc.json`, `.mdocrc` files.

Example:

```javascript
module.exports = {
  createPath: true,
  apiDocPath: './apidoc',
  output: 'docs/API.md',
  multi: false,
}
```

## Example

```console
$@: yarn apidoc -i ./src -o ./.apidoc && yarn mdoc-markdown -p ./.apidoc -o docs/API.md
```

---
_Source: https://npm.io/package/@microfleet/mdoc · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
