gulp-tinypng-plugin
v1.0.7
Published
tinypng图片压缩工具,支持多个Key,支持已压缩图片缓存。gulp plugin to compress png images using tinypng api
Downloads
2
Maintainers
Readme
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