update-markdown-usage

Updates a markdown document section with CLI usage info via --help.


Keywords
markdown, update, cli, usage
License
MIT
Install
npm install update-markdown-usage@1.0.4

Documentation

update-markdown-usage

Updates a markdown document section with CLI usage info via --help.

NPM Build Status JavaScript Style Guide

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.

Install

npm install -g update-markdown-usage

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

NPM scripts

  "scripts: {
    "docs": "update-markdown-usage"
  },

Related

License

MIT © Travis Fischer