react-docs-markdown

0.8.0 • Public • Published

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.

Package Sidebar

Install

npm i react-docs-markdown

Weekly Downloads

82

Version

0.8.0

License

MIT

Unpacked Size

27.4 kB

Total Files

14

Last publish

Collaborators

  • thebuilder