Gathering detailed insights and metrics for node-sass-global-import-once
Gathering detailed insights and metrics for node-sass-global-import-once
npm install node-sass-global-import-once
Typescript
Module System
Node Version
NPM Version
69.1
Supply Chain
98.7
Quality
75.1
Maintenance
100
Vulnerability
100
License
JavaScript (100%)
Total Downloads
1,434
Last Day
1
Last Week
3
Last Month
12
Last Year
77
2 Stars
7 Commits
2 Watching
1 Branches
1 Contributors
Latest Version
1.0.2
Package Id
node-sass-global-import-once@1.0.2
Size
3.19 kB
NPM Version
2.14.2
Node Version
0.12.7
Cumulative downloads
Total Downloads
Last day
-50%
1
Compared to previous day
Last week
-40%
3
Compared to previous week
Last month
71.4%
12
Compared to previous month
Last year
-22.2%
77
Compared to previous year
Import Sass files once globally.
Useful when you would want to exclude certain components in output files and leave them only in one location (e.g. one component is imported globally and any other attempt to load it would produce empty string). Goes along nicely with node-sass-import-once.
1npm install node-sass-global-import-once --save
input/index.scss
1@import "foo"; 2@import "bar"; 3@import "baz"; 4 5body { 6 color:red; 7}
input/page.scss
1@import "foo"; 2@import "bar"; 3@import "baz"; 4 5body { 6 color:red; 7}
1var sass = require('node-sass'); 2var gio = require('node-sass-global-import-once'); 3 4['./input/index.scss', './input/page.scss'].forEach(function ( file ) { 5 6 sass.render({ 7 file: file, 8 importer: [ 9 gio([ 10 { 11 file: '**/index.scss', 12 imports: [ 13 'foo', 14 'baz' 15 ] 16 } 17 ]), 18 ] 19 }, function( err, result ) { 20 //=> … 21 }); 22 23});
Given two entry Sass files, they would be treated as:
input/index.scss
1@import "foo"; 2@import "bar"; 3@import "baz"; 4 5body { 6 color:red; 7}
input/page.scss
1@import "bar"; 2 3body { 4 color:red; 5}
page.scss
doesn’t include foo
and bar
imports since they should be imported globally only once inside index.scss
.
Package expects one argument, array of definitions (object) for global imports.
Each object definitions contains following properties:
Type: String
Name of the file or minimatch expression which is considered as global entry point.
Type: Array
List of imports as strings which are considered to be global imports. Package only reads exact names defined inside files, so relative filenames which map to certain absolute package names are treated as different packages.
MIT © Ivan Nikolić
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
no SAST tool detected
Details
Reason
Found 0/7 approved changesets -- score normalized to 0
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
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Score
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 More