# mdmanifest

> markdown manifests for muxrpc apis

Latest version **1.0.8** (published 2016-01-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install mdmanifest
pnpm add mdmanifest
yarn add mdmanifest
bun add mdmanifest
```

Provides the command `mdm`.

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.8 |
| Published | 2016-01-25 |
| First published | 2015-09-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 6 |
| Author | Paul Frazee |
| Maintainers | pfraze |
| Keywords | markdown, muxrpc, api, manifest |

## Links

- npm: https://www.npmjs.com/package/mdmanifest
- Repository: https://github.com/ssbc/mdmanifest
- Homepage: https://github.com/ssbc/mdmanifest#readme
- Issues: https://github.com/ssbc/mdmanifest/issues
- npm.io page: https://npm.io/package/mdmanifest

## Dependencies (4)

- [remark](https://npm.io/package/remark.md) ^3.2.2
- [minimist](https://npm.io/package/minimist.md) ^1.2.0
- [word-wrap](https://npm.io/package/word-wrap.md) ^1.1.0
- [remark-html](https://npm.io/package/remark-html.md) ^2.0.2

## Alternatives

- [@mdxeditor/editor](https://npm.io/package/@mdxeditor/editor.md) — 962.4K weekly downloads
- [mmdb-lib](https://npm.io/package/mmdb-lib.md) — 680.9K weekly downloads
- [playcanvas](https://npm.io/package/playcanvas.md) — 36.2K weekly downloads
- [@glw907/cairn-cms](https://npm.io/package/@glw907/cairn-cms.md) — 967 weekly downloads
- [markdown-to-confluence](https://npm.io/package/markdown-to-confluence.md) — 103 weekly downloads

## Recent versions

- 1.0.8 (latest) — 2016-01-25
- 1.0.7 — 2015-09-20
- 1.0.6 — 2015-09-15
- 1.0.5 — 2015-09-14
- 1.0.4 — 2015-09-14
- 1.0.3 — 2015-09-14
- 1.0.2 — 2015-09-14
- 1.0.0 — 2015-09-14

## README

# Markdown Manifest

Uses a regular markdown form to produce muxrpc manifests and cli usage descriptions.

The form:

```markdown
# api-name

Api short description.

Api long, multiline description (optional).
Api long, multiline description (optional).
Api long, multiline description (optional).

## method-name: type

Method short description.

```bash
bash usage (optional)
``` --

```js
js usage (optional)
``` --

Method long, multiline description (optional).
Method long, multiline description (optional).
Method long, multiline description (optional).
```

Example:

```markdown
# example-api

Example API, v1.0.0.

This is an example API, written by Paul Frazee.
It's not a real API, but it would work with muxrpc.

## ping: async

Pings a target machine.

```bash
ping {target string} [-n number]
``` --

```js
ping(target, { n: })
``` --

 - target: string, an IPv4/IPv6 address
 - opts:
   - n: optional number, how many times to ping

Sends ICMP ping messages to the given target.
Will wait 1 second between pings.

## listen: source

Listens for pings.

```bash
listen
``` --

```js
listen()
``` --

Will emit a string describing incoming pings, as they occur.
```

The api:

```js
var mdm = require('mdmanifest')

mdm.muxrpcManifest(exampleMd)
/* => {
  ping: 'async',
  listen: 'source'
}*/

mdm.usage(exampleMd) 
/* => 
Example API, v1.0.0.

This is an example API, written by Paul Frazee.
It's not a real API, but it would work with muxrpc.

Commands:

 - ping    Pings a target machine.
 - listen  Listens for pings.
*/

mdm.usage(exampleMd, { prefix: 'foo' })
/* => 
Example API, v1.0.0.

This is an example API, written by Paul Frazee.
It's not a real API, but it would work with muxrpc.

Commands:

 - foo.ping    Pings a target machine.
 - foo.listen  Listens for pings.
*/

mdm.usage(exampleMd, { nameWidth: 20 }) 
/* => 
Example API, v1.0.0.

This is an example API, written by Paul Frazee.
It's not a real API, but it would work with muxrpc.

Commands:

 - ping                Pings a target machine.
 - listen              Listens for pings.
*/

mdm.usage(exampleMd, 'ping')
/* =>
Pings a target machine.

ping {target string} [-n number]

-   target: string, an IPv4/IPv6 address
-   opts:
    -   n: optional number, how many times to ping

Sends ICMP ping messages to the given target.
Will wait 1 second between pings.
*/

mdm.html(exampleMd) // standard HTML output
```

Command-line usage:

```
:~/mdmanifest⭐  ./mdm.js manifest ./test/valid-example.md 
{
  "ping": "async",
  "listen": "source"
}

:~/mdmanifest⭐  ./mdm.js html ./test/valid-example.md 
<h1>example-api</h1>
<p>Example API, v1.0.0.</p>
...

:~/mdmanifest⭐  ./mdm.js usage ./test/valid-example.md 
Example API, v1.0.0.

This is an example API, written by Paul Frazee.
It's not a real API, but it would work with muxrpc.

Commands:
  ping    Pings a target machine.
  listen  Listens for pings.

:~/mdmanifest⭐  ./mdm.js usage ./test/valid-example.md ping
Pings a target machine.

ping {target string} [-n number]

-   target: string, an IPv4/IPv6 address
-   opts:
    -   n: optional number, how many times to ping

Sends ICMP ping messages to the given target.
Will wait 1 second between pings.
```

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