storybook-addon-ondevice-autodocs
v1.0.5
Published
Add on for auto generating documentations in storybook >4.0.0
Downloads
3
Readme
Storybook Addon Device AutoDocs
This addon relies on the creation of react-docgen and creates document maps for your directories.
Installation
npm i -D storybook-addon-ondevice-autodocs
Usage
- Run the creation of the react-docgen for the docs directory
node ./node_modules/storybook-addon-ondevice-autodocs/dist/compileDocs.js [--options]
Available Options are:
-d
: Directory In: Which directory are you referring to, in relation to where you are executing this method? Defaults to./src
-o
: Directory Out: Which directory should the documentation map go to? Defaults to./docs
-i
: Ignored Files: Which files should it not document? Defaults toindex.stories.js,index.story.js
- Utilize the addon in your storybook
rn-addons
config
import 'storybook-addon-ondevice-autodocs/register'
- Require the addon in your decorator at the
*.stories.js
level
import { withAutoDocs } from 'storybook-addon-ondevice-autodocs';
import docs from '../path/to/docs.json';
addDecorator(withAutoDocs);
storiesOf(`MyNewStories`, (<MyComponent>), { docgen: docs.MyComponent });
Contributing
git clone https://gitlab.com/mean-guppy/storybook-addon-ondevice-autodocs.git </path/to/your/dir>
npm i
npm run transpile