carteb / carte-blanche

An isolated development space with integrated fuzz testing for your components. See them individually, explore them in different states and quickly and confidently develop them.
https://www.youtube.com/watch?v=6g3-TQ6aaw8
MIT License
1.5k stars 47 forks source link

Implement the React-docs plugin #298

Open nikgraf opened 8 years ago

nikgraf commented 8 years ago

This plugins should create a table/list out of the propTypes/Flow types. We already started parsing the component using React-docgen and rendering the JSON, but it needs some nice styling & formatting.

see the code here: https://github.com/carteb/carte-blanche/tree/master/plugins/react-docs

You can add a plugin like this: import ReactDocsPlugin from '../../plugins/react-docs/dist/plugin'; and then

    new CarteBlanche({
      componentRoot: './src/components/',
      plugins: [
        new ReactPlugin(),
        new ReactDocsPlugin(),
      ],
    }),

As an example you can use: https://github.com/carteb/carte-blanche/blob/master/examples/dev/webpack.dev.babel.js