Gathering detailed insights and metrics for @newwwton/addon-storysource
Gathering detailed insights and metrics for @newwwton/addon-storysource
Gathering detailed insights and metrics for @newwwton/addon-storysource
Gathering detailed insights and metrics for @newwwton/addon-storysource
Storybook is the industry standard workshop for building, documenting, and testing UI components in isolation
npm install @newwwton/addon-storysource
Typescript
Module System
Node Version
NPM Version
TypeScript (75.57%)
JavaScript (22.15%)
MDX (0.78%)
Svelte (0.64%)
Vue (0.32%)
HTML (0.22%)
CSS (0.2%)
EJS (0.05%)
Pug (0.04%)
Handlebars (0.02%)
Shell (0.01%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
87,253 Stars
70,837 Commits
9,608 Forks
930 Watchers
744 Branches
2,005 Contributors
Updated on Jul 15, 2025
Latest Version
5.3.0-alpha.23
Package Id
@newwwton/addon-storysource@5.3.0-alpha.23
Unpacked Size
652.11 kB
Size
623.71 kB
File Count
13
NPM Version
6.9.0
Node Version
10.16.0
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
This addon is used to show stories source in the addon panel.
First, install the addon
1yarn add @storybook/addon-storysource --dev
Add this line to your addons.js
file
1import '@storybook/addon-storysource/register';
Use this hook to a custom webpack.config. This will generate a decorator call in every story:
1module.exports = function({ config }) { 2 config.module.rules.push({ 3 test: /\.stories\.jsx?$/, 4 loaders: [require.resolve('@storybook/source-loader')], 5 enforce: 'pre', 6 }); 7 8 return config; 9};
The loader can be customized with the following options:
The parser that will be parsing your code to AST (based on prettier)
Allowed values:
javascript
- defaulttypescript
flow
Be sure to update the regex test for the webpack rule if utilizing Typescript files.
Usage:
1module.exports = function({ config }) { 2 config.module.rules.push({ 3 test: /\.stories\.tsx?$/, 4 loaders: [ 5 { 6 loader: require.resolve('@storybook/source-loader'), 7 options: { parser: 'typescript' }, 8 }, 9 ], 10 enforce: 'pre', 11 }); 12 13 return config; 14};
The prettier configuration that will be used to format the story source in the addon panel.
Defaults:
1{ 2 printWidth: 100, 3 tabWidth: 2, 4 bracketSpacing: true, 5 trailingComma: 'es5', 6 singleQuote: true, 7}
Usage:
1module.exports = function({ config }) { 2 config.module.rules.push({ 3 test: /\.stories\.jsx?$/, 4 loaders: [ 5 { 6 loader: require.resolve('@storybook/source-loader'), 7 options: { 8 prettierConfig: { 9 printWidth: 100, 10 singleQuote: false, 11 }, 12 }, 13 }, 14 ], 15 enforce: 'pre', 16 }); 17 18 return config; 19};
The array of regex that is used to remove "ugly" comments.
Defaults:
1[/^eslint-.*/, /^global.*/];
Usage:
1module.exports = function({ config }) { 2 config.module.rules.push({ 3 test: /\.stories\.jsx?$/, 4 loaders: [ 5 { 6 loader: require.resolve('@storybook/source-loader'), 7 options: { 8 uglyCommentsRegex: [/^eslint-.*/, /^global.*/], 9 }, 10 }, 11 ], 12 enforce: 'pre', 13 }); 14 15 return config; 16};
Tell storysource whether you need inject decorator. If false, you need to add the decorator by yourself;
Defaults: true
Usage:
1module.exports = function({ config }) { 2 config.module.rules.push({ 3 test: /\.stories\.jsx?$/, 4 loaders: [ 5 { 6 loader: require.resolve('@storybook/source-loader'), 7 options: { injectDecorator: false }, 8 }, 9 ], 10 enforce: 'pre', 11 }); 12 13 return config; 14};
Storysource will automatically use the light or dark syntax theme based on your storybook theme. See Theming Storybook for more information.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
11 out of 11 merged PRs checked by a CI test -- score normalized to 10
Reason
42 different organizations found -- score normalized to 10
Details
Reason
no dangerous workflow patterns detected
Reason
update tool detected
Details
Reason
license file detected
Details
Reason
30 commit(s) out of 30 and 11 issue activity out of 30 found in the last 90 days -- score normalized to 10
Reason
security policy file detected
Details
Reason
no vulnerabilities detected
Reason
9 out of last 12 changesets reviewed before merge -- score normalized to 7
Reason
dependency not pinned by hash detected -- score normalized to 7
Details
Reason
no badge detected
Reason
project is not fuzzed
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
non read-only tokens detected in GitHub workflows
Details
Score
Last Scanned on 2024-03-19
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