1.0.7 • Published 6 years ago

gulp-tinypng-plugin v1.0.7

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

gulp-tinypng-plugin

该插件增加了缓存功能,设置为cache : true,同时支持多个Key。

Minify PNG using tinypng Reference resources gulp-tinypng

Install

Install with npm

npm install --save-dev gulp-tinypng-plugin

Example

var gulp = require('gulp');
var tinypng = require('gulp-tinypng');

gulp.task('tinypng', function () {
    gulp.src('src/**/*.png')
        .pipe(tinypng({
            //key : 'API_KEY'
            key : ['API_KEY1', 'API_KEY2','...'],
            cache : true
        }))
        .pipe(gulp.dest('compressed_images'));
});

tinypng(options)

key: API_KEY(String || Array)

cache: Open cache

License

MIT