javascript

Minify CSS using Gulp

//INSTALLATION - npm install gulp-clean-css --save-dev
var gulp = require('gulp');
var cleanCSS = require('gulp-clean-css');

gulp.task('css_minify', function() {
    return gulp.src('app/css/*.css')
            .pipe(cleanCSS())
            .pipe(gulp.dest('dist/css'));
});

You can use gulp-clean-css npm package to minify CSS using gulp.

Was this helpful?