{"id":44902984,"url":"https://github.com/ysansan98/electron-tools","last_synced_at":"2026-02-17T22:02:06.333Z","repository":{"id":306882047,"uuid":"1025991693","full_name":"ysansan98/electron-tools","owner":"ysansan98","description":null,"archived":false,"fork":false,"pushed_at":"2025-07-28T06:40:28.000Z","size":236,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-27T17:48:53.252Z","etag":null,"topics":["icns","ico","icon-generator","macos","windows"],"latest_commit_sha":null,"homepage":"https://electron-tools.vercel.app","language":"Vue","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ysansan98.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-25T06:20:21.000Z","updated_at":"2025-08-05T09:11:09.000Z","dependencies_parsed_at":"2025-07-28T08:36:49.543Z","dependency_job_id":"f7bb4ef2-3857-4dcb-8d00-813cf3c5f5db","html_url":"https://github.com/ysansan98/electron-tools","commit_stats":null,"previous_names":["whitexie/electron-tools"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ysansan98/electron-tools","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ysansan98%2Felectron-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ysansan98%2Felectron-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ysansan98%2Felectron-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ysansan98%2Felectron-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ysansan98","download_url":"https://codeload.github.com/ysansan98/electron-tools/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ysansan98%2Felectron-tools/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29559961,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-17T21:50:49.831Z","status":"ssl_error","status_checked_at":"2026-02-17T21:46:15.313Z","response_time":100,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["icns","ico","icon-generator","macos","windows"],"created_at":"2026-02-17T22:02:06.170Z","updated_at":"2026-02-17T22:02:06.303Z","avatar_url":"https://github.com/ysansan98.png","language":"Vue","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Electron 图标转换器\n\n一个基于 Web 的工具，用于将图像转换为多平台的 Electron 应用程序图标。\n\n![Nuxt](https://img.shields.io/badge/Nuxt-4.x-00DC82?style=flat\u0026logo=nuxt.js)\n![Vue](https://img.shields.io/badge/Vue-3.x-4FC08D?style=flat\u0026logo=vue.js)\n![TypeScript](https://img.shields.io/badge/TypeScript-5.x-3178C6?style=flat\u0026logo=typescript)\n![Tailwind CSS](https://img.shields.io/badge/Tailwind%20CSS-4.x-06B6D4?style=flat\u0026logo=tailwind-css)\n\n## ✨ 产品特性\n\n- 🖼️ **多格式支持**: 支持 PNG、JPG、SVG、WebP 输入格式\n- 🎯 **多平台输出**: 一键生成 Windows (.ico)、macOS (.icns)、Linux (.png) 图标\n- 📦 **批量下载**: ZIP 包形式下载所有平台图标\n- 🔒 **隐私安全**: 完全客户端处理，无需服务器上传\n- 🌙 **主题支持**: 深色/浅色模式切换\n- 📱 **响应式设计**: 适配各种设备屏幕尺寸\n\n## 🎯 支持的图标格式\n\n### Windows (.ico)\n- 包含多种嵌入尺寸：16px、24px、32px、48px、64px、128px、256px\n- 适配不同显示缩放比例\n\n### macOS (.icns)\n- 针对高分辨率显示器优化\n- 最高支持 1024px 分辨率\n\n### Linux (.png)\n- 多种标准尺寸：16px、32px、48px、64px、128px、256px、512px\n- 符合 Linux 桌面环境规范\n\n## 🚀 快速开始\n\n### 环境要求\n\n- Node.js 18+\n- pnpm 10.13.1+\n\n### 安装依赖\n\n```bash\n# 使用 pnpm（推荐）\npnpm install\n\n# 或使用 npm\nnpm install\n\n# 或使用 yarn\nyarn install\n```\n\n### 开发环境\n\n```bash\n# 启动开发服务器 (http://localhost:3000)\npnpm dev\n```\n\n### 构建部署\n\n```bash\n# 生产构建\npnpm build\n\n# 静态站点生成\npnpm generate\n\n# 预览生产构建\npnpm preview\n\n# 静态文件服务\npnpm serve:static\n```\n\n## 🧪 测试\n\n```bash\n# 运行所有测试\npnpm test\n\n# 监听模式测试\npnpm test:watch\n\n# 测试UI界面\npnpm test:ui\n\n# 类型检查\npnpm typecheck\n\n# 代码检查和修复\npnpm lint\n```\n\n## 📁 项目结构\n\n```\n├── app/                    # Nuxt 4 源代码目录\n│   ├── assets/            # 静态资源\n│   │   └── css/          # 样式文件\n│   ├── components/        # Vue 组件\n│   │   ├── ConverterResultPrewview.vue\n│   │   ├── FileUploadZone.vue\n│   │   ├── IconConverterMain.vue\n│   │   ├── ImagePreview.vue\n│   │   ├── PlatformConfigure.vue\n│   │   └── __tests__/    # 组件测试\n│   ├── composables/       # 组合式函数\n│   │   ├── useAlterError.ts\n│   │   ├── useConverter.ts\n│   │   └── __tests__/    # 组合式函数测试\n│   ├── converters/        # 转换器核心逻辑\n│   │   ├── icnsGenerator.ts   # macOS icns 生成器\n│   │   ├── icoGenerator.ts    # Windows ico 生成器\n│   │   ├── imageGenerator.ts  # Linux png 生成器\n│   │   ├── index.ts\n│   │   └── __tests__/\n│   ├── pages/             # 页面路由\n│   │   └── index.vue     # 首页\n│   ├── types/             # TypeScript 类型定义\n│   │   ├── canvas.ts     # Canvas 相关类型\n│   │   ├── platform.ts   # 平台配置类型\n│   │   ├── services.ts   # 服务接口类型\n│   │   └── validation.ts # 验证相关类型\n│   ├── utils/             # 工具函数\n│   │   ├── file-utils.ts     # 文件处理工具\n│   │   ├── image-utils.ts    # 图像处理工具\n│   │   └── platform-utils.ts # 平台相关工具\n│   └── app.config.ts      # 应用配置\n├── public/                # 公共静态文件\n├── docs/                  # 项目文档\n├── .kiro/                 # Kiro AI助手配置\n├── nuxt.config.ts         # Nuxt 配置文件\n├── vitest.config.ts       # 测试配置\n└── eslint.config.mjs      # ESLint 配置\n```\n\n## 🛠️ 技术栈\n\n### 核心框架\n- **Nuxt 4**: Vue.js 全栈框架，使用 `app/` 作为源目录\n- **Vue 3**: 组合式 API，TypeScript 支持\n- **TypeScript**: 严格模式，类型检查启用\n\n### UI 和样式\n- **Nuxt UI**: 基于 Headless UI 的组件库\n- **Tailwind CSS**: 实用优先的 CSS 框架\n- **Nuxt Icon**: 图标系统，支持多种图标集\n- **Color Mode**: 深色/浅色主题切换\n\n### 构建和开发工具\n- **Vite**: 构建工具和开发服务器\n- **pnpm**: 包管理器\n- **ESLint**: 代码检查，使用 @antfu/eslint-config\n- **TypeScript**: 编译和类型检查\n\n### 测试框架\n- **Vitest**: 单元测试框架\n- **@testing-library/vue**: Vue 组件测试\n- **jsdom**: DOM 环境模拟\n\n### 核心依赖\n- **fflate**: ZIP 文件生成\n- **Canvas API**: 图像处理和转换\n\n## 🏗️ 架构设计\n\n### 组件组织\n- **页面组件**: `pages/` - 路由级别组件\n- **功能组件**: `components/` - 可复用 UI 组件\n- **布局组件**: 使用 Nuxt 默认布局系统\n\n### 逻辑分层\n- **Composables**: 业务逻辑和状态管理\n- **Utils**: 纯函数工具，无状态\n- **Types**: TypeScript 类型定义\n- **Converters**: 图标转换核心逻辑\n\n### 状态管理\n- 使用 Vue 3 组合式 API 的 `ref` 和 `reactive`\n- Composables 封装状态逻辑\n- 无需额外状态管理库（Pinia/Vuex）\n\n## 📝 开发规范\n\n### 命名约定\n- **组件**: PascalCase (IconConverterMain.vue)\n- **Composables**: camelCase with use前缀 (useConverter.ts)\n- **Utils**: kebab-case (file-utils.ts)\n- **Types**: camelCase (index.ts)\n\n### 代码约定\n- **变量**: camelCase\n- **常量**: UPPER_SNAKE_CASE\n- **类型**: PascalCase\n- **接口**: PascalCase with I前缀（可选）\n\n### 提交规范\n使用约定式提交（Conventional Commits）规范：\n\n```\n\u003c类型\u003e[可选范围]: \u003c描述\u003e\n\n[可选正文]\n\n[可选脚注]\n```\n\n#### 提交类型\n- **feat**: 新功能\n- **fix**: 修复bug\n- **docs**: 文档更新\n- **style**: 代码格式调整\n- **refactor**: 代码重构\n- **perf**: 性能优化\n- **test**: 添加或修改测试\n- **chore**: 构建过程或辅助工具的变动\n\n#### 提交示例\n```bash\nfeat(converter): 添加SVG格式支持\nfix(ui): 修复深色模式下按钮颜色问题\ndocs: 更新README中的安装说明\nrefactor(utils): 优化图像处理工具函数结构\ntest(converter): 添加PNG转换功能单元测试\n```\n\n## 🎯 使用方法\n\n1. **上传图像**: 支持拖拽或点击上传 PNG、JPG、SVG、WebP 格式的图像\n2. **预览效果**: 实时预览转换后的图标效果\n3. **选择平台**: 选择需要生成的目标平台图标\n4. **一键下载**: 点击下载按钮获取 ZIP 格式的图标包\n\n## 🤝 贡献指南\n\n1. Fork 本项目\n2. 创建特性分支 (`git checkout -b feat/amazing-feature`)\n3. 提交更改 (`git commit -m 'feat: 添加某个特性'`)\n4. 推送到分支 (`git push origin feat/amazing-feature`)\n5. 创建 Pull Request\n\n## 📄 许可证\n\n本项目采用 MIT 许可证 - 查看 [LICENSE](LICENSE) 文件了解详情。\n\n## 🙏 致谢\n\n- [Nuxt](https://nuxt.com/) - 优秀的 Vue.js 框架\n- [Tailwind CSS](https://tailwindcss.com/) - 实用优先的 CSS 框架\n- [fflate](https://github.com/101arrowz/fflate) - 高性能压缩库\n\n---\n\n如果这个项目对您有帮助，请给我们一个 ⭐️ 星标支持！\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fysansan98%2Felectron-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fysansan98%2Felectron-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fysansan98%2Felectron-tools/lists"}