Giter Club home page Giter Club logo

documentation-readme's Introduction

documentation-readme

Circle CI npm version

Inject documentationjs-generated documentation into your README.md.

Usage

Command line

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

This will look for a section in README.md 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 [file=README.md] --section "API" [--compare-only] [--] [documentationjs options]

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

plugin

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

Parameters

  • mdast

  • opts

Examples

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) {
 console.log(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.

documentation-readme's People

Contributors

anandthakker avatar tmcw avatar waldyrious avatar

Watchers

James Cloos avatar Suman avatar  avatar

Forkers

aroyiem

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.