rdm

react-docs-markdown

Convert the output of react-docgen into markdown

Showing:

Popularity

Downloads/wk

71

GitHub Stars

3

Maintenance

Last Commit

4mos ago

Contributors

9

Package

Dependencies

2

Size (min+gzip)

18.8KB

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

React Docs Markdown

Greenkeeper badge

Build Status

At the moment this is a simple package, that takes the output from react-docgen, and returns it as Markdown. You can then save it to a file, append more content, or whatever you need.

API

docsToMarkdown(api: object, name: string, options: Object)

  • api - The output from react-docgen.
  • name - Component name to set as page title
  • options (Optional)
    • excludeKeys
    • excludeTypes
    • excludeDescription

Example

var fs = require('fs');
var docsToMarkdown = require('react-docs-markdown');

var md = docsToMarkdown(api, 'Button');

// Use fs to write the markdown to dist
fs.writeFile('docs/button.md', md, (err) => {
  if (err) throw err;
});

Publishing

Use np when publishing a new version to ensure everything is done correctly.

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100