Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/simon-he95/tiny-tinify-compress
tiny-tinify-compress with simple configuration, powerful compression just enter "compress" to complete the compression
https://github.com/simon-he95/tiny-tinify-compress
tiny-tinify-compress
Last synced: 10 days ago
JSON representation
tiny-tinify-compress with simple configuration, powerful compression just enter "compress" to complete the compression
- Host: GitHub
- URL: https://github.com/simon-he95/tiny-tinify-compress
- Owner: Simon-He95
- License: mit
- Created: 2022-08-01T11:09:25.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-12-15T11:47:36.000Z (11 months ago)
- Last Synced: 2024-09-18T05:02:42.777Z (about 2 months ago)
- Topics: tiny-tinify-compress
- Language: TypeScript
- Homepage:
- Size: 292 KB
- Stars: 4
- Watchers: 0
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: license
Awesome Lists containing this project
README
![picture](/assets/logo.png)## 介绍
- 依赖[tinify](https://tinypng.com/)提供的api实现一个简单的压缩工具
- gif图片的实现来源于[imagemin-gifsicle](https://github.com/imagemin/imagemin-gifsicle)
- 压缩过的图片会被自动跳过,不会重复压缩
- 需要[申请tinify的key](https://tinify.cn/developers),免费提供一个我自己的key:DZkjgp25tVjhkLG8GXk0nF3tpNSkq7kX## 安装
```shell
npm i -g tiny-tinify-compress
```## 配置
```shell
# package.json 配置你自己key, 申请地址 https://tinypng.com/developers
# includes: "压缩目录下的图片" 只支持 'image/webp', 'image/jpeg', 'image/png', 'image/jpg', 'image/jfif', 'image/gif'
{
"tinifyCompress": {
"key": "your-key",
"includes": [
"./assets/**"
]
}
}
```## 使用
```shell
## 如果配置了key,否则第一次会提示你输入key
compress
## 可以指定需要压缩的目录
compress ./assets ./public/images
```## License
[MIT](./LICENSE) License © 2022 [Simon He](https://github.com/Simon-He95)