Gathering detailed insights and metrics for @bolt/sass-export-data
Gathering detailed insights and metrics for @bolt/sass-export-data
Gathering detailed insights and metrics for @bolt/sass-export-data
Gathering detailed insights and metrics for @bolt/sass-export-data
Flexible, un-opinionated tools for front end development
npm install @bolt/sass-export-data
Typescript
Module System
Node Version
NPM Version
JavaScript (93.74%)
HTML (3.74%)
CSS (2.51%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
11 Stars
167 Commits
5 Forks
2 Watchers
6 Branches
2 Contributors
Updated on Nov 05, 2023
Latest Version
5.0.0
Package Id
@bolt/sass-export-data@5.0.0
Unpacked Size
17.25 kB
Size
5.15 kB
File Count
16
NPM Version
lerna/4.0.0/node@v14.18.1+x64 (darwin)
Node Version
14.18.1
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
Uses custom functions in node-sass
to export JSON files from Sass maps and other variables.
1npm install --save @theme-tools/sass-export-data
1const config = { 2 name: 'export_data', // Name of Sass function 3 path: 'path/to/export/folder/' // Folder where to place JSON files 4}; 5const sassExportData = require('@theme-tools/sass-export-data')(config);
Then pass sassExportData
to the functions
option in node-sass
. It'll be the object like it wants, so you could merge it with other functions if needed. This can work with many ways to compile sass: gulp, webpack, basic cli, or anything that utilizes node-sass
.
In your sass declare this mixin to make it easier:
1/// Export Sass Data to JSON in `path/to/export/folder/` folder 2/// @param {String} $filename - ie `mystuff.json` 3/// @param $var - What to turn into JSON 4/// @example scss 5/// @include export-data-to-lib('filename.json', $sass-map); 6@mixin export-data($filename, $var) { 7 // The `export_data` function is a custom function added to Sass. 8 // The `$data` var is weird, but needed. 9 $data: export_data($filename, $var); 10};
Then you can do this wherever you'd like:
1$x: ( 2 a: 'Apple', 3 b: 'Beer', 4); 5 6@include export-data('example.json', $x);
This will create the file example.json
in path/to/export/folder/
with:
1{ 2 "a": "Apple", 3 "b": "Beer" 4}
Special thanks to node-sass-export
for inspiration and much of the original code.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
no SAST tool detected
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
48 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