Skip to content

ZhelinCheng/gulp-tinypng-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

Releases

No releases published

Packages

No packages published