Read your docopt configuration directly from your README.md file and package.json.
Readme files must contain a code block with the language type
docopt
. All text within the block is passed as the docopt configuration.
See fixture/
for an example.
var docoptmd = require('docoptmd');
var options = docoptmd(__dirname, {argv: process.argv});
All existing docopt options are passed right through. In addition to these,
docoptmd introduces the readme
option, which specifies the basename of the
readme file (default README.md
).
Licensed under the MIT license