Gathering detailed insights and metrics for react-docgen-typescript-plugin
Gathering detailed insights and metrics for react-docgen-typescript-plugin
Gathering detailed insights and metrics for react-docgen-typescript-plugin
Gathering detailed insights and metrics for react-docgen-typescript-plugin
@storybook/react-docgen-typescript-plugin
A webpack plugin to inject react typescript docgen information.
react-docgen-typescript
[![Build Status](https://github.com/styleguidist/react-docgen-typescript/actions/workflows/nodejs.yml/badge.svg)](https://github.com/styleguidist/react-docgen-typescript/actions/workflows/nodejs.yml)
storybook-addon-react-docgen
A storybook addon to display react docgen info.
babel-plugin-react-docgen
Babel plugin to add react-docgen info into your code
A webpack plugin to inject react typescript docgen information
npm install react-docgen-typescript-plugin
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
69 Stars
227 Commits
28 Forks
4 Watching
6 Branches
9 Contributors
Updated on 21 Nov 2024
TypeScript (98%)
JavaScript (2%)
Cumulative downloads
Total Downloads
Last day
9.4%
76,221
Compared to previous day
Last week
16.5%
387,310
Compared to previous week
Last month
36.7%
1,480,619
Compared to previous month
Last year
-8.7%
15,738,597
Compared to previous year
2
31
A webpack plugin to inject react typescript docgen information
1npm install --save-dev react-docgen-typescript-plugin 2# or 3yarn add -D react-docgen-typescript-plugin
NOTE: The TypeScript compiler options
allowSyntheticDefaultImports
andesModuleInterop
will makereact-docgen-typescript-plugin
a lot harder! Turn them off for faster build times.
1const ts = require('typescript'); 2const ReactDocgenTypescriptPlugin = require("react-docgen-typescript-plugin").default; 3 4module.exports = { 5 plugins: [ 6 // Will default to loading your root tsconfig.json 7 new ReactDocgenTypescriptPlugin(), 8 // or with a specific tsconfig 9 new ReactDocgenTypescriptPlugin({ tsconfigPath: "./tsconfig.dev.json" }), 10 // or with compiler options 11 new ReactDocgenTypescriptPlugin({ compilerOptions: { jsx: ts.JsxEmit.Preserve } }), 12 ], 13};
This plugins support all parser options from react-docgen-typescript and all of the following options
Option | Type | Description | Default |
---|---|---|---|
tsconfigPath | string | Specify the location of the tsconfig.json to use. | null |
compilerOptions | object | Specify compiler options. Cannot be used with tsconfigPath | null |
docgenCollectionName | string or null | Specify the docgen collection name to use. All docgen information will be collected into this global object. Set to null to disable. | STORYBOOK_REACT_CLASSES |
setDisplayName | boolean | Set the components' display name. If you want to set display names yourself or are using another plugin to do this, you should disable this option. | true |
typePropName | string | Specify the name of the property for docgen info prop type. | type |
exclude | glob[] | Glob patterns to ignore and not generate docgen information for. (Great for ignoring large icon libraries) | [] |
include | glob[] | Glob patterns to generate docgen information for | ['**/**.tsx'] |
If you want to see how this plugins is including and excluding modules set the DEBUG
environment variable.
DEBUG=docgen:*
- All logsDEBUG=docgen:include
- Included modulesDEBUG=docgen:exclude
- Excluded modulesDEBUG=docgen:docs
- Generated docs1DEBUG=docgen:* npm run storybook
Another great way of debugging your generated docs is to use a
debugger
statement in your component source file. If you turn off source maps you will be able to see the code that this package generates.
Thanks goes to these wonderful people (emoji key):
Andrew Lisowski 💻 🎨 📖 🤔 🚧 🚇 ⚠️ | Michael Shilman 💻 | Kyle Herock 💻 | Juho Vepsäläinen 🚇 ⚠️ 💻 📖 | Egor Pogadaev ⚠️ 💻 | Anton Savoskin 💻 | Trevor Burnham ⚠️ 💻 |
Maxime Meriouma-Caron 🚇 ⚠️ 💻 | Adam Skoufis 💻 | Nicholas Narsing 📖 ⚠️ 💻 |
This project follows the all-contributors specification. Contributions of any kind welcome!
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 5/21 approved changesets -- score normalized to 2
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
21 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More