Gathering detailed insights and metrics for node-sass-json-vars
Gathering detailed insights and metrics for node-sass-json-vars
Gathering detailed insights and metrics for node-sass-json-vars
Gathering detailed insights and metrics for node-sass-json-vars
Defines additional built-in Sass functions that allow using variables from .json files in .scss files.
npm install node-sass-json-vars
Typescript
Module System
Node Version
NPM Version
JavaScript (85.25%)
SCSS (14.75%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
22 Commits
1 Watchers
10 Branches
2 Contributors
Updated on Jun 11, 2024
Latest Version
2.0.0
Package Id
node-sass-json-vars@2.0.0
Unpacked Size
8.09 kB
Size
3.56 kB
File Count
6
NPM Version
10.1.0
Node Version
20.9.0
Published on
Nov 20, 2023
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 module defines additional built-in Sass functions that allow using variables from .json
files in .scss
files.
1npm install --save-dev node-sass-json-vars
Note: it's recommended to install node-sass-json-vars locally project by project.
1const sassFunctions = require('node-sass-json-vars'); 2 3module.exports = { 4... 5 { 6 test: /\.scss$/, 7 use: [ 8 'style-loader', 9 'css-loader', 10 { 11 loader: "sass-loader", 12 options: { 13 sassOptions: { 14 functions: sassFunctions, 15 }, 16 }, 17 }, 18 ], 19 }, 20... 21}
getMapFromJSON($key, $config)
: transforms a JSON Object into a SASS Map.
"colors"
"/path/to/variables.json"
. Defaults to config/variables.json
config/variables.json
1{ 2 "colors": { 3 "catalina-blue": "#1D3557", 4 "charlotte": "#A8DADC", 5 "panache": "#F1FAEE", 6 "amaranth": "#E63946", 7 "jelly-bean": "#457B9D" 8 } 9}
_colors.scss
1$colors: getMapFromJSON("colors"); 2 3:root { 4 // Brand colours. 5 @each $colorName, $colorHex in $colors { 6 --color-#{$colorName}: #{$colorHex}; 7 } 8}
style.css
1:root { 2 --color-catalina-blue: #1d3557; 3 --color-charlotte: #a8dadc; 4 --color-panache: #f1faee; 5 --color-amaranth: #e63946; 6 --color-jelly-bean: #457b9d; 7}
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
project is archived
Details
Reason
Found 0/15 approved changesets -- 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
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
12 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
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