图片压缩 使用前需申请key (注意:图片压缩格式只支持jpeg/png)
api来自 https://tinypng.com/
First, install Yeoman and generator-tiny-compress using npm (we assume you have pre-installed node.js).
npm install -g yo
npm install -g generator-tiny-compress
Then generate your new project:
yo tiny-compress
将需要压缩的图片复制到 source目录下 运行 npm run compress 稍等片刻 output目录下便会生成压缩后的图片
MIT © xiazc