Package Exports
- gulp-tinypng-nokey
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (gulp-tinypng-nokey) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
gulp-tinypng-nokey
模拟用户上传和下载的行为,来得到压缩图片,突破使用官网api的500张限制
这个和之前的项目 tinypng-node-plugin 类似。只是这个是gulp插件,之前的是传统方式。
如何使用
var gulp = require('gulp');
var tiny = require('gulp-tinypng-nokey');
gulp.task('tinypng', function(cb) {
gulp.src('src/*')
.pipe(tiny())
.pipe(gulp.dest('dist'));
});参考
https://github.com/creativeaura/gulp-tinypng http://www.gulpjs.com.cn/docs/writing-a-plugin/guidelines/