Skip to content

transitive-bullshit/update-markdown-usage

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
lib
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

Support my OSS work by following me on twitter twitter

About

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

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published