react-docgen
react-docgen copied to clipboard
A CLI and library to extract information from React component files for documentation generation purposes.
## Original Example (fixtures_23.tsx) ```tsx /** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE...
I use create-react-app with "react-scripts": "^2.1.5" and "react-styleguidist": "^8.0.6" ``` Warning: Cannot parse src/components/Card/Card.jsx: SyntaxError: Invalid regular expression flag (1:8) It usually means that react-docgen does not understand your source...
I am trying to write a script to generate markdown from the generated JSON output. I have reviewed the documentation for `parse()` and I am trying to use the `findAllComponentDefinitions`...
`react-docgen` ignores original line-endings in the file and replaces them with the system wide EOL setting. Repro: https://github.com/eps1lon/issue-react-docgen-windows-eol
Take this simple styled component: ``` type Props = { color: string, }; const Foo: StatelessFunctionalComponent = styled.div` color: ${props => props.color}; `; // @component export default Foo; ``` react-dogen...
I love this library, I use it to generate the documentation for https://jamesmfriedman.github.io/rmwc/. If this library could detect cast expressions from Flow, it seemingly would fix any sort of style...
I don't know whether this applies to all **Flow** [utility types](https://flow.org/en/docs/types/utilities/#toc-shape) in general, but React makes extensive use of `$Shape` (and so do we!) - `react-docgen` (3.0.0-rc.1) seems to fail...
Hello, Thanks for your library! I ran into an issue where a option (flow annotation) argument in a handler was causing my class to not be parsed.. resulting in `You...
``` react-docgen --pretty -o lib/metadata.json src/components ``` On Windows produces: ``` { "src\\components\\ExampleComponent.react.js": { "description": "ExampleComponent is an example component.\r\nIt takes a single property, `label`, and\r\ndisplays it.", "methods": [], "props":...
Hello! when defining prop types people do all sorts of things, for example: ```js import omit from 'lodash/omit'; import OtherComponent from 'important/path'; export default class Component extends React.PureComponent { propTypes...