Installations
npm install styled-jsx-plugin-postcss
Score
65.2
Supply Chain
98.9
Quality
74.7
Maintenance
100
Vulnerability
100
License
Developer
giuseppeg
Developer Guide
Module System
CommonJS
Min. Node Version
Typescript Support
No
Node Version
12.16.2
NPM Version
6.14.4
Statistics
92 Stars
40 Commits
17 Forks
4 Watching
7 Branches
11 Contributors
Updated on 14 Oct 2024
Languages
JavaScript (99.79%)
CSS (0.21%)
Total Downloads
Cumulative downloads
Total Downloads
3,775,726
Last day
-6.1%
1,916
Compared to previous day
Last week
-1.8%
11,610
Compared to previous week
Last month
-10.9%
50,541
Compared to previous month
Last year
-6.8%
635,889
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
1
Peer Dependencies
1
styled-jsx-plugin-postcss
Use PostCSS with styled-jsx 💥
⚠️ This plugin is not actively being maintained. If you want me to work on it please consider donating.
Supporters
Companies and individuals who sponsored some work on this library:
Usage
Install this package first.
1npm install --save styled-jsx-plugin-postcss
Next, add styled-jsx-plugin-postcss
to the styled-jsx
's plugins
in your
babel configuration:
1{ 2 "plugins": [ 3 ["styled-jsx/babel", { "plugins": ["styled-jsx-plugin-postcss"] }] 4 ] 5}
With config:
1{ 2 "plugins": [ 3 [ 4 "styled-jsx/babel", 5 { 6 "plugins": [ 7 [ 8 "styled-jsx-plugin-postcss", 9 { 10 "path": "[PATH_PREFIX]/postcss.config.js", 11 "compileEnv": "worker" 12 } 13 ] 14 ] 15 } 16 ] 17 ] 18}
compileEnv
When using Node.js v12.3.0 and above the plugin defaults to compiling using a worker thread instead of a child process. This results in faster builds.
If for any reason you want to force compiling using a child process (slower) you can register the plugin with the config option compileEnv
set to process
.
Example with CRA
Usage with Create React App requires you to either eject or use react-app-rewired.
Here is an example using react-app-rewired
:
1// config-overrides.js 2// this file overrides the CRA webpack.config 3 4const { getBabelLoader } = require("react-app-rewired"); 5 6module.exports = function override(config, env) { 7 const loader = getBabelLoader(config.module.rules); 8 9 // Older versions of webpack have `plugins` on `loader.query` instead of `loader.options`. 10 const options = loader.options || loader.query; 11 options.plugins = [ 12 [ 13 "styled-jsx/babel", 14 { 15 plugins: ["styled-jsx-plugin-postcss"], 16 }, 17 ], 18 ].concat(options.plugins || []); 19 return config; 20};
Note: Please follow their instructions on how to set up build & test scripts, and make sure you have a correctly formatted postcss.config.js
as well.
Notes
styled-jsx-plugin-postcss
uses styled-jsx
's plugin system which is supported
from version 2. Read more on their repository for further info.
Plugins
styled-jsx-plugin-postcss
uses
postcss-load-config
therefore you may want to refer to their docs to learn more about
adding plugins.
Contributions
PRs and contributions are welcome!
We aim to drive development of this plugin through community contributions.
License
MIT
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
Found 5/23 approved changesets -- score normalized to 2
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/node.js.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/giuseppeg/styled-jsx-plugin-postcss/node.js.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/node.js.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/giuseppeg/styled-jsx-plugin-postcss/node.js.yml/master?enable=pin
- Info: 0 out of 2 GitHub-owned GitHubAction dependencies pinned
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
- Warn: no topLevel permission defined: .github/workflows/node.js.yml:1
- Info: no jobLevel write permissions found
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
license file not detected
Details
- Warn: project does not have a license file
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 15 are checked with a SAST tool
Reason
13 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-w8qv-6jwh-64r5
- Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c
- Warn: Project is vulnerable to: GHSA-ww39-953v-wcq6
- Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm
- Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3
- Warn: Project is vulnerable to: GHSA-qrpm-p2h7-hrv2
- Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9
- Warn: Project is vulnerable to: GHSA-566m-qj78-rww5
- Warn: Project is vulnerable to: GHSA-hwj9-h5mp-3pm3
- Warn: Project is vulnerable to: GHSA-7fh5-64p2-3v2j
- Warn: Project is vulnerable to: GHSA-c4w7-xm78-47vh
Score
2.4
/10
Last Scanned on 2024-11-25
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