Gathering detailed insights and metrics for saladcss-partial-import
Gathering detailed insights and metrics for saladcss-partial-import
Gathering detailed insights and metrics for saladcss-partial-import
Gathering detailed insights and metrics for saladcss-partial-import
Inline standard and Sass-like imports in CSS
npm install saladcss-partial-import
Typescript
Module System
Min. Node Version
Node Version
NPM Version
62.5
Supply Chain
96.7
Quality
72.7
Maintenance
50
Vulnerability
98.2
License
JavaScript (100%)
Total Downloads
5,172
Last Day
1
Last Week
4
Last Month
22
Last Year
168
NOASSERTION License
41 Commits
1 Forks
1 Watchers
1 Branches
1 Contributors
Updated on Apr 11, 2021
Minified
Minified + Gzipped
Latest Version
1.0.1
Package Id
saladcss-partial-import@1.0.1
Size
4.05 kB
NPM Version
3.7.3
Node Version
5.9.1
Published on
Jun 07, 2016
Cumulative downloads
Total Downloads
Last Day
0%
1
Compared to previous day
Last Week
100%
4
Compared to previous week
Last Month
46.7%
22
Compared to previous month
Last Year
-31.1%
168
Compared to previous year
4
Partial Import is a PostCSS plugin that inlines standard and Sass-like @import
statements.
1/* before file.css */ 2 3@import "foo/bar"; 4 5/* before foo/_bar.css */ 6 7html { 8 background-color: #fafafa; 9} 10 11/* after */ 12 13html { 14 background-color: #fafafa; 15} 16
Follow these steps to use Partial Import.
Add Partial Import to your build tool:
1npm install postcss-partial-import --save-dev
1require('postcss-partial-import')({ /* options */ }).process(YOUR_CSS);
Add PostCSS to your build tool:
1npm install postcss --save-dev
Load Partial Import as a PostCSS plugin:
1postcss([ 2 require('postcss-partial-import')({ /* options */ }) 3]);
Add Gulp PostCSS to your build tool:
1npm install gulp-postcss --save-dev
Enable Partial Import within your Gulpfile:
1var postcss = require('gulp-postcss'); 2 3gulp.task('css', function () { 4 return gulp.src('./css/src/*.css').pipe( 5 postcss([ 6 require('postcss-partial-import')({ /* options */ }) 7 ]) 8 ).pipe( 9 gulp.dest('./css') 10 ); 11});
Add Grunt PostCSS to your build tool:
1npm install grunt-postcss --save-dev
Enable Partial Import within your Gruntfile:
1grunt.loadNpmTasks('grunt-postcss');
2
3grunt.initConfig({
4 postcss: {
5 options: {
6 processors: [
7 require('postcss-partial-import')({ /* options */ })
8 ]
9 },
10 dist: {
11 src: 'css/*.css'
12 }
13 }
14});
encoding
Type: String
Default: utf8
The character encoding of files being imported.
extension
Type: String
Default: css
The file extension appended to partials being imported.
prefix
Type: String
Default: _
The file extension sometimes prepended to partials being imported.
generate
Type: Boolean
Default: false
The option if partials should be generated if they do not already exist.
cachedir
Type: String
Default: null
The directory to store cached includes in. Can reduce compilation time when there are a lot of @include
s. Setting this property enables the cache.
addDependencyTo
Type: function
Default: null
To pass CSS @import files to a compiler (such as webpack), which would otherwise not know which CSS files to watch for browser reloading.
Example
1// webpack.config.js 2postcss: function(webpack) { 3 return [ 4 precss({ addDependencyTo: webpack }) 5 ]; 6},
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
Found 0/30 approved changesets -- 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-06-23
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