cli-help-from-readme
v1.0.0
Published
Generate a CLI help message from a README.md. Default is to use the default README of the package
Downloads
4
Readme
cli-help-from-readme
This will generate a CLI help message using a README.md or readme.md file
placed at the same level as you executable, e.g. cli.js. It will return
the readme
message stripped of any markdown formatting.
Install
npm install --save cli-help-from-readme
Usage
import { getHelpMessage } from './index.js';
// Returns a string with the help message
let helpMessage = getHelpMessage();
// Or read a specific file
let helpMessage = getHelpMessage('path/to/readme.md');
console.log(helpMessage);
Licence
MIT © Dennis Iversen