Gathering detailed insights and metrics for gulp-csso
Gathering detailed insights and metrics for gulp-csso
Gathering detailed insights and metrics for gulp-csso
Gathering detailed insights and metrics for gulp-csso
npm install gulp-csso
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
243 Stars
82 Commits
22 Forks
13 Watching
4 Branches
6 Contributors
Updated on 12 Oct 2024
JavaScript (99.24%)
CSS (0.76%)
Cumulative downloads
Total Downloads
Last day
-8.3%
5,515
Compared to previous day
Last week
1.7%
29,140
Compared to previous week
Last month
5.6%
117,465
Compared to previous month
Last year
-15.5%
1,491,674
Compared to previous year
3
Minify CSS with CSSO.
If you have any difficulties with the output of this plugin, please use the CSSO tracker.
With npm do:
npm install gulp-csso --save-dev
1var gulp = require('gulp'); 2var csso = require('gulp-csso'); 3 4gulp.task('default', function () { 5 return gulp.src('./main.css') 6 .pipe(csso()) 7 .pipe(gulp.dest('./out')); 8}); 9 10gulp.task('development', function () { 11 return gulp.src('./main.css') 12 .pipe(csso({ 13 restructure: false, 14 sourceMap: true, 15 debug: true 16 })) 17 .pipe(gulp.dest('./out')); 18});
For backwards compatibility it can also be a boolean
. In this case, the
inverted value is set to options.restructure
(e.g. true
becomes {restructure: false}
).
Type: boolean
Default: true
The default is to use structure minimization for maximum compression.
Pass false
instead if you want to disable this feature.
Type: boolean
Default: depends on input file has a source map or not
Specify this to generate source map; by default a source map is generated only
if the input file has a source map. Pass true
to ensure that the source map
is generated or false
to disable this.
Alternatively, you can enable source maps support using gulp-sourcemaps:
1var gulp = require('gulp'); 2var csso = require('gulp-csso'); 3var sourcemaps = require('gulp-sourcemaps'); 4 5gulp.task('default', function () { 6 return gulp.src('main.css') 7 .pipe(sourcemaps.init()) 8 .pipe(csso()) 9 .pipe(sourcemaps.write('.')) 10 .pipe(gulp.dest('./out')); 11});
Type: boolean
Default: false
Pass true
or a positive number (greater number for more details) to get some
debugging information about the minification process.
Type: object
Default: null
Usage data for advanced optimisations (read more in the CSSO documentation).
Pull requests are welcome. If you add functionality, then please add unit tests to cover it.
MIT © Ben Briggs
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
7 existing vulnerabilities detected
Details
Reason
Found 4/30 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
project is not fuzzed
Details
Reason
security policy file not detected
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
Score
Last Scanned on 2024-11-25
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