# tinypng **Repository Path**: wayagame/tinypng ## Basic Information - **Project Name**: tinypng - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-04-01 - **Last Updated**: 2025-04-02 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # TinyPNG - 图片压缩工具 一个使用TinyPNG API优化PNG和JPEG图片的命令行工具。 ## 功能特性 - 批量处理多张图片 - 进度跟踪显示 - 彩色控制台输出 - 基于TypeScript实现 ## 安装步骤 1. 克隆仓库: ```bash git clone https://gitee.com/wayagame/tinypng.git ``` 2. 设置TinyPNG API密钥(从 https://tinypng.com/developers 获取): ```bash export TINYPNG_API_KEY=your_api_key ``` ## 可用命令 - `npm start`: 构建并运行生产版本 - `npm run dev`: 使用nodemon运行开发模式 - `npm test`: 运行测试 - `npm run build`: 编译TypeScript到JavaScript ## 项目结构 ``` tinypng/ ├── src/ # 源代码目录 │ └── index.ts # 主入口文件 ├── dist/ # 编译输出目录 ├── package.json # 项目配置 └── tsconfig.json # TypeScript配置 ``` ## 依赖项 - [tinify](https://github.com/tinify/tinify-node) - TinyPNG API客户端 - [chalk](https://github.com/chalk/chalk) - 终端字符串样式 - [progress](https://github.com/visionmedia/node-progress) - 进度条显示 ## 许可证 MIT © 2025 floyda@163.com