Gathering detailed insights and metrics for @storybook/react-docgen-typescript-plugin
Gathering detailed insights and metrics for @storybook/react-docgen-typescript-plugin
A webpack plugin to inject react typescript docgen information
npm install @storybook/react-docgen-typescript-plugin
Typescript
Module System
86.9
Supply Chain
68.8
Quality
80.8
Maintenance
100
Vulnerability
97.9
License
TypeScript (98%)
JavaScript (2%)
Love this project? Help keep it running — sponsor us today! 🚀
Total Downloads
493,028,305
Last Day
670,421
Last Week
2,913,654
Last Month
14,086,305
Last Year
159,045,535
MIT License
69 Stars
227 Commits
28 Forks
4 Watchers
6 Branches
9 Contributors
Updated on Nov 21, 2024
Latest Version
1.0.1
Package Id
@storybook/react-docgen-typescript-plugin@1.0.1
Size
16.36 kB
Published on
Jul 30, 2021
Cumulative downloads
Total Downloads
Last Day
0.1%
670,421
Compared to previous day
Last Week
-16%
2,913,654
Compared to previous week
Last Month
53.7%
14,086,305
Compared to previous month
Last Year
0.3%
159,045,535
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 ???? ⚠️ ???? |
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
no effort to earn an OpenSSF best practices badge detected
Reason
detected GitHub workflow tokens with excessive permissions
Details
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
22 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-02-10
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