Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/transitive-bullshit/update-markdown-usage
Updates a markdown section with CLI usage info via --help.
https://github.com/transitive-bullshit/update-markdown-usage
cli markdown usage
Last synced: 2 months ago
JSON representation
Updates a markdown section with CLI usage info via --help.
- Host: GitHub
- URL: https://github.com/transitive-bullshit/update-markdown-usage
- Owner: transitive-bullshit
- Created: 2018-05-13T19:31:27.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-04T00:48:28.000Z (almost 2 years ago)
- Last Synced: 2024-10-20T01:09:53.782Z (3 months ago)
- Topics: cli, markdown, usage
- Language: JavaScript
- Size: 911 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 9
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# update-markdown-usage
> Updates a markdown document section with CLI usage info via `--help`.
[![NPM](https://img.shields.io/npm/v/update-markdown-usage.svg)](https://www.npmjs.com/package/update-markdown-usage) [![Build Status](https://travis-ci.com/transitive-bullshit/update-markdown-usage.svg?branch=master)](https://travis-ci.com/transitive-bullshit/update-markdown-usage) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
This module makes it easy for a node CLI module to update the usage section of its readme by pasting in the results of running with `--help`.
See the `docs` script in this module's [package.json](package.json) for a concrete example of how this readme's `Usage` section is updated automatically.
## Install
```bash
npm install -g update-markdown-usage
```## Usage
```bash
Usage: update-markdown-usage [options]Options:
-V, --version output the version number
-f, --file markdown file to update (defaults to local readme)
-i, --stdin read usage from stdin (defaults to running pkg binary with --help)
-P, --prefix optional markdown section prefix
-S, --suffix optional markdown section suffix
-s, --section name of markdown section to update (default: usage)
-W, --no-write write result to stdout (defaults to updating markdown file)
-h, --help output usage information
```## NPM scripts
```json
"scripts: {
"docs": "update-markdown-usage"
},
```## Related
- [update-markdown-jsdoc](https://github.com/transitive-bullshit/update-markdown-jsdoc) - Same as this module but for documenting libraries with jsdoc.
- [mdast-util-inject](https://github.com/anandthakker/mdast-util-inject) - Mdast utility to inject some markdown content into some other markdown at a certain heading.
- [add-text-to-markdown](https://github.com/azu/add-text-to-markdown) - Add stdin text to exist markdown file.## License
MIT © [Travis Fischer](https://transitivebullsh.it)
Support my OSS work by following me on twitter