A CSS Modules transform to extract local aliases for inline imports
Installations
npm install postcss-modules-extract-imports
Developer
css-modules
Developer Guide
Module System
CommonJS
Min. Node Version
^10 || ^12 || >= 14
Typescript Support
No
Node Version
18.19.0
NPM Version
10.2.3
Statistics
41 Stars
106 Commits
6 Forks
7 Watching
134 Branches
15 Contributors
Updated on 19 Jun 2024
Bundle Size
2.26 kB
Minified
1.18 kB
Minified + Gzipped
Languages
JavaScript (53.99%)
CSS (46.01%)
Total Downloads
Cumulative downloads
Total Downloads
4,161,163,251
Last day
-6.7%
3,318,925
Compared to previous day
Last week
1.2%
18,738,571
Compared to previous week
Last month
8.3%
79,350,313
Compared to previous month
Last year
-6.9%
888,546,414
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Peer Dependencies
1
CSS Modules: Extract Imports
Transforms:
1:local(.continueButton) { 2 composes: button from "library/button.css"; 3 color: green; 4}
into:
1:import("library/button.css") { 2 button: __tmp_487387465fczSDGHSABb; 3} 4:local(.continueButton) { 5 composes: __tmp_487387465fczSDGHSABb; 6 color: green; 7}
Specification
- Only a certain whitelist of properties are inspected. Currently, that whitelist is
['composes']
alone. - An extend-import has the following format:
composes: className [... className] from "path/to/file.css", className [... className], className [... className] from global;
Options
failOnWrongOrder
bool
generates exception for unpredictable imports order.
1.aa { 2 composes: b from "./b.css"; 3 composes: c from "./c.css"; 4} 5 6.bb { 7 /* "b.css" should be before "c.css" in this case */ 8 composes: c from "./c.css"; 9 composes: b from "./b.css"; 10}
Building
npm install
npm test
License
ISC
With thanks
- Mark Dalgleish
- Tobias Koppers
- Guy Bedford
Glen Maddern, 2015.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: ISC License: LICENSE:0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 0/8 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
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
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 28 are checked with a SAST tool
Reason
20 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-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c
- Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj
- Warn: Project is vulnerable to: GHSA-896r-f27r-55mw
- Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9
- Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3
- Warn: Project is vulnerable to: GHSA-5fw9-fq32-wv5p
- Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9
- Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
- Warn: Project is vulnerable to: GHSA-44c6-4v22-4mhx
- Warn: Project is vulnerable to: GHSA-4x5v-gmq8-25ch
- Warn: Project is vulnerable to: GHSA-jgrx-mgxx-jf9v
- Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3
- Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7
- Warn: Project is vulnerable to: GHSA-c4w7-xm78-47vh
Score
1.7
/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