Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

gulp-css-condense Build Status NPM version Dependency Status

A gulp plugin for the CSS compressor that shows no mercy.

If you have any difficulties with the output of this plugin, please use the css-condense tracker.

Install via npm:

npm install gulp-css-condense --save-dev

Example

var gulp = require('gulp');
var cssc = require('gulp-css-condense');

gulp.task('default', function() {
    return gulp.src('./main.css')
        .pipe(cssc())
        .pipe(gulp.dest('./out'));
});

Options

safe

Type: Boolean

If this is set to true, css-condense will not perform optimisations such as selector and declaration consolidation (the docs have more information). Note that you can also choose which optimisations that you deem to be fit for your build by passing them individually:

var gulp = require('gulp');
var cssc = require('gulp-css-condense');

gulp.task('default', function() {
    return gulp.src('./main.css')
        .pipe(cssc({
            consolidateViaDeclarations: true,
            consolidateViaSelectors: false,
            consolidateMediaQueries: true
        }))
        .pipe(gulp.dest('./out'));
});

options.safe is just a convenience for specifying all of the above options as false.

Contributing

Pull requests are welcome. If you add functionality, then please add unit tests to cover it.

License

MIT © Ben Briggs

About

A gulp plugin for the CSS compressor that shows no mercy.

Resources

License

You can’t perform that action at this time.