Gathering detailed insights and metrics for @storybook/addon-postcss
Gathering detailed insights and metrics for @storybook/addon-postcss
Gathering detailed insights and metrics for @storybook/addon-postcss
Gathering detailed insights and metrics for @storybook/addon-postcss
storybook-addon-sass-postcss
Storybook addon used to run the PostCSS preprocessor with Sass support against your stories.
@storybook/addon-controls
Interact with component inputs dynamically in the Storybook UI
@storybook/addon-toolbars
Create your own toolbar items that control story rendering
@storybook/addon-actions
Get UI feedback when an action is performed on an interactive element
This Storybook addon can be used to run the PostCSS preprocessor against your stories.
npm install @storybook/addon-postcss
47.9
Supply Chain
63.3
Quality
79.6
Maintenance
50
Vulnerability
99.6
License
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
21 Stars
19 Commits
21 Forks
6 Watching
2 Branches
100 Contributors
Updated on 30 Jul 2024
Minified
Minified + Gzipped
JavaScript (54.74%)
MDX (25.25%)
CSS (10.08%)
TypeScript (9.93%)
Cumulative downloads
Total Downloads
Last day
-16.7%
32,055
Compared to previous day
Last week
-0.3%
192,950
Compared to previous week
Last month
5.3%
855,143
Compared to previous month
Last year
-39.2%
12,305,417
Compared to previous year
26
🚨 DEPRECATED: This package is unmaintained and deprecated in favor of @storybook/addon-styling-webpack and @storybook/addon-themes
The Storybook PostCSS addon can be used to run the PostCSS preprocessor against your stories in Storybook.
Install this addon by adding the @storybook/addon-postcss
dependency:
1yarn add -D @storybook/addon-postcss
within .storybook/main.js
:
1module.exports = { 2 addons: ['@storybook/addon-postcss'], 3};
and create a PostCSS config in the base of your project, like postcss.config.js
, that contains:
1module.exports = { 2 // Add your installed PostCSS plugins here: 3 plugins: [ 4 // require('autoprefixer'), 5 // require('postcss-color-rebeccapurple'), 6 ], 7};
If your project requires you to be using PostCSS v8, you can replace the included PostCSS by passing postcssLoaderOptions
to this addon.
First, you'll need to install PostCSS v8 as a dependency of your project:
1yarn add -D postcss@^8
Then, you'll need to update your addons config. Within .storybook/main.js
:
1module.exports = { 2 addons: [ 3- '@storybook/addon-postcss', 4+ { 5+ name: '@storybook/addon-postcss', 6+ options: { 7+ postcssLoaderOptions: { 8+ implementation: require('postcss'), 9+ }, 10+ }, 11+ }, 12 ] 13}
When running Storybook, you'll see the version of PostCSS being used in the logs. For example:
1info => Using PostCSS preset with postcss@8.2.4
You can specify loader options for style-loader
, css-loader
, and postcss-loader
by passing options to this addon as styleLoaderOptions
, cssLoaderOptions
, or postcssLoaderOptions
respectively.
You can also configure the loader rule by overriding the rule
option.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 2/6 approved changesets -- score normalized to 3
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
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
security policy file not detected
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
71 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