finscn / gulp-pngquant-cache

A pngquant gulp plugin with cache.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

gulp-pngquant-cache

A pngquant gulp plugin with cache.

Inspired & Based on : gulp-pngquant & gulp-tinypng-unlimited

Installation

$ npm install gulp-pngquant-cache

Usage

const gulp = require('gulp');
const gulpPngquant = require('gulp-pngquant-cache');

gulp.task('compress', function() {
    gulp.src('./images/*.png')
        .pipe(gulpPngquant({
            quality: '65-80',
            cache: true,
            cachePath: path.join(__dirname, '_cache/')
        }))
        .pipe(gulp.dest('./compressed/'));
});

gulp.task('default', ['compress']);

License

MIT © finscn

About

A pngquant gulp plugin with cache.

License:MIT License


Languages

Language:JavaScript 100.0%