Installations
npm install gulp-sass-vars
Developer Guide
Typescript
No
Module System
CommonJS
Node Version
14.16.1
NPM Version
6.14.12
Score
68.9
Supply Chain
84
Quality
72.2
Maintenance
100
Vulnerability
100
License
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (95.78%)
SCSS (4.22%)
Developer
giowe
Download Statistics
Total Downloads
469,976
Last Day
175
Last Week
1,006
Last Month
4,987
Last Year
68,620
GitHub Statistics
14 Stars
28 Commits
4 Forks
2 Watching
7 Branches
3 Contributors
Bundle Size
78.18 kB
Minified
19.87 kB
Minified + Gzipped
Package Meta Information
Latest Version
1.1.5
Package Id
gulp-sass-vars@1.1.5
Unpacked Size
5.69 kB
Size
2.50 kB
File Count
7
NPM Version
6.14.12
Node Version
14.16.1
Total Downloads
Cumulative downloads
Total Downloads
469,976
Last day
-29.4%
175
Compared to previous day
Last week
-21.3%
1,006
Compared to previous week
Last month
8.7%
4,987
Compared to previous month
Last year
-19.8%
68,620
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
gulp-sass-vars
Inject variables in sass files from a js object.
Usage
1npm install gulp-sass-vars
1 2var sassVars = require('gulp-sass-vars'); 3 4gulp.task('sass', function() { 5 const variables = { 6 theme: null, 7 url: 'https://github.com/giowe/gulp-sass-vars', 8 font: { 9 family: ["'Open Sans'", 'sans-serif'], 10 size: '1.6em', 11 color: 'rgb(0,0,0)', 12 'line-height': 1.5 13 }, 14 sizes: ['xs', 'sm', 'lg'], 15 responsive: true, 16 display: 'flex' 17 }; 18 19 return gulp.src('src/styles/main.scss') 20 .pipe(sassVars(variables, { verbose: true })) 21 .pipe(sass()) 22 .pipe(gulp.dest('dist')); 23});
This script will prepend the following code to your main.scss file:
1$theme: null; 2$url: 'https://github.com/giowe/gulp-sass-vars'; 3$font: ( 4 'family': ('\'Open Sans\'', 'sans-serif'), 5 'size': 1.6em, 6 'color': rgb(0,0,0), 7 'line-height': 1.5 8); 9$sizes: ('xs', 'sm', 'lg'); 10$responsive: true; 11$display: 'flex';
So you can use all those variables inside your sass file.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
Found 3/16 approved changesets -- score normalized to 1
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
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
22 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92
- 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-w573-4hg7-7wgq
- Warn: Project is vulnerable to: GHSA-4gmj-3p3h-gm8h
- Warn: Project is vulnerable to: GHSA-896r-f27r-55mw
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3
- Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h
- Warn: Project is vulnerable to: GHSA-r8f7-9pfq-mjmv
- Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9
- Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp
- Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6
- Warn: Project is vulnerable to: GHSA-7mwh-4pqv-wmr8
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
- Warn: Project is vulnerable to: GHSA-3jfq-g458-7qm9
- Warn: Project is vulnerable to: GHSA-5955-9wpr-37jh
- Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36
- Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3
- Warn: Project is vulnerable to: GHSA-7p7h-4mm5-852v
- Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7
Score
1.4
/10
Last Scanned on 2025-01-27
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 MoreOther packages similar to gulp-sass-vars
gulp-sass-vars-convertor
Sass 变量转换器
gulp-sass-vars-to-js
Export Sass variables to JavaScript
gulp-json-sass-vars
Gulp plugin for turning JSON files into files of scss/sass/less variable definitions.
generator-vars-django
Generator for Django app + Gulp, Browserify, Babel, Sass/Stylus and more.