Updates a markdown document section with CLI usage info via
--help
.
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 for a concrete example of how this readme's Usage
section is updated automatically.
npm install -g update-markdown-usage
Usage: update-markdown-usage [options]
Options:
-V, --version output the version number
-f, --file <filename> markdown file to update (defaults to local readme)
-i, --stdin read usage from stdin (defaults to running pkg binary with --help)
-P, --prefix <string> optional markdown section prefix
-S, --suffix <string> optional markdown section suffix
-s, --section <string> 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
"scripts: {
"docs": "update-markdown-usage"
},
- update-markdown-jsdoc - Same as this module but for documenting libraries with jsdoc.
- mdast-util-inject - Mdast utility to inject some markdown content into some other markdown at a certain heading.
- add-text-to-markdown - Add stdin text to exist markdown file.
MIT © Travis Fischer
Support my OSS work by following me on twitter