1.0.6 • Published 2 years ago
@trickl/react-props-md-table v1.0.6
react-props-md-table
This tiny tool uses react-docgen to generate markdown tables of the props of a React component.
Installation
npm i -g @trickl/react-props-md-tableUsage
Run the following command in the terminal to replace the props table in readme.md in the same directory.
props-table path/to/SomeComponent.jsThe props table in the file needs to be wrapped between <!-- props-table-start --> and <!-- props-table-end --> for the replacement to work.
Options
--to-consolewill write the props table to the terminal instead of the file.--forcewill write the props table at the end of the readme if no table wrapped by comments is found. The readme.md will be created if it doesn't exist.--helpor-hdisplay usage options--versionor-vdisplay version information