inject documentation into your
Last updated 5 years ago by anandthakker .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install documentation-readme 
SYNC missed versions from official npm registry.


Circle CI npm version

Inject documentationjs-generated documentation into your


Command line

npm install -g documentation-readme
cd /your/project
documentation-readme -s "API Usage" -- [documentationjs opts]

This will look for a section in with a heading like ## API Usage. (The heading can be any level.) The content under that heading will be replaced with output of documentationjs using any arguments you specified: documentation -f md [documentationjs opts].

Other options:

Usage: bin/documentation-readme documentation [] --section "API" [--compare-only] [--] [documentationjs options]

  -s, --section       The section heading after which to inject generated documentation   [required]
  -c, --compare-only  Instead of updating the given README with the generated documentation, just
                      check if its contents match, exiting nonzero if not.          [default: false]
  -q, --quiet         Quiet mode: do not print messages or README diff to stdout.   [default: false]
  -h, --help          Show help                                                            [boolean]
  --version           Show version number                                                  [boolean]

npm script

cd /your/project
npm install --save-dev documentation-readme

And then add to your package.json:

  // ... other scripts
  "docs": "documentation-readme -s \"API Usage\""

mdast plugin


An mdast plugin to inject the output of documentationjs at a certain heading in a markdown file.


  • mdast

  • opts


var docjsReadme = require('documentation-readme/lib/plugin')
mdast.use(docjsReadme, {
 section: 'usage', // inject into the ## Usage section of the input doc
 documentationArgs: [ '--shallow', '/path/to/entry.js' ]
}).process(inputMarkdownContent, function(err, vfile, content) {


documentation is an OPEN Open Source Project. This means that:

Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project.

Current Tags

  • 2.1.1                                ...           latest (5 years ago)

4 Versions

  • 2.1.1                                ...           5 years ago
  • 2.1.0                                ...           5 years ago
  • 2.0.0                                ...           5 years ago
  • 1.0.0                                ...           5 years ago
Maintainers (2)
Today 0
This Week 1
This Month 3
Last Day 0
Last Week 0
Last Month 0
Dependencies (5)
Dev Dependencies (4)

Copyright 2014 - 2016 © |