Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

gulp-cssnano

2.1.3 • Public • Published

gulp-cssnano Build Status NPM version Dependency Status

Minify CSS with cssnano.

Install

With npm do:

npm install gulp-cssnano --save-dev

Example

var gulp = require('gulp');
var cssnano = require('gulp-cssnano');
 
gulp.task('default', function() {
    return gulp.src('./main.css')
        .pipe(cssnano())
        .pipe(gulp.dest('./out'));
});

Source Maps

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'));
});

Contributing

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

License

MIT © Ben Briggs

install

npm i gulp-cssnano

Downloadsweekly downloads

45,317

version

2.1.3

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability