gulp-cssnano
![Dependency Status](https://camo.githubusercontent.com/5bafe973fcef440f2ad56cec90448d7b100e4c30c05dee07e1f9a620264c5072/68747470733a2f2f67656d6e617369756d2e636f6d2f62656e2d65622f67756c702d6373736e616e6f2e737667)
Minify CSS with cssnano.
With npm do:
npm install gulp-cssnano --save-dev
var gulp = require('gulp');
var cssnano = require('gulp-cssnano');
gulp.task('default', function() {
return gulp.src('./main.css')
.pipe(cssnano())
.pipe(gulp.dest('./out'));
});
gulp-cssnano supports gulp-sourcemaps:
var gulp = require('gulp');
var cssnano = require('gulp-cssnano');
var sourcemaps = require('gulp-sourcemaps');
gulp.task('default', function () {
return gulp.src('main.css')
.pipe(sourcemaps.init())
.pipe(cssnano())
.pipe(sourcemaps.write('.'))
.pipe(gulp.dest('./out'));
});
Pull requests are welcome. If you add functionality, then please add unit tests to cover it.
MIT © Ben Briggs