{"id":28092658,"url":"https://github.com/waahah/vext","last_synced_at":"2025-07-12T02:10:45.419Z","repository":{"id":284819488,"uuid":"955770590","full_name":"waahah/VExt","owner":"waahah","description":"🚀构建”一次编写，在任何浏览器上运行“的 Web 扩展启动器🖥Cross-browser and automatic publishing of WebExtension starter templates powered by Vite.","archived":false,"fork":false,"pushed_at":"2025-04-26T14:09:43.000Z","size":147,"stargazers_count":10,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-13T13:44:04.085Z","etag":null,"topics":["chrome","cross-browser","edge","extension","firefox","javascript","sass","template","vext","vite","webextension"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/waahah.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}},"created_at":"2025-03-27T07:04:20.000Z","updated_at":"2025-04-26T14:09:46.000Z","dependencies_parsed_at":"2025-03-27T21:26:49.025Z","dependency_job_id":"37df08e7-bee4-4755-b18d-fb1f557e34cd","html_url":"https://github.com/waahah/VExt","commit_stats":null,"previous_names":["waahah/vext"],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/waahah/VExt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waahah%2FVExt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waahah%2FVExt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waahah%2FVExt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waahah%2FVExt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/waahah","download_url":"https://codeload.github.com/waahah/VExt/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waahah%2FVExt/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264923713,"owners_count":23683793,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["chrome","cross-browser","edge","extension","firefox","javascript","sass","template","vext","vite","webextension"],"created_at":"2025-05-13T13:32:45.336Z","updated_at":"2025-07-12T02:10:45.408Z","avatar_url":"https://github.com/waahah.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e🚀 VExt\u003c/h1\u003e\n\u003cp align=\"center\"\u003e🖥构建”一次编写，在任何浏览器上运行“的 Web 扩展启动器🔋\u003c/p\u003e\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://github.com/waahah/VExt/blob/master/LICENSE\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/license/waahah/VExt.svg\" alt=\"LICENSE\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/waahah\"\u003e\n     \u003cimg src=\"https://img.shields.io/static/v1?label=%20\u0026message=Github\u0026style=flat-square\u0026labelColor=black\u0026color=4258dd\u0026logo=github\" alt=\"github\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"README_EN.md\"\u003eEnglish\u003c/a\u003e\n  \u003ca href=\"README.md\"\u003e简体中文\u003c/a\u003e\n\u003c/div\u003e\n\u003ch3 align=\"center\"\u003e🙋‍♂️ Made by \u003ca href=\"https://www.waahah.xyz/about\"\u003e@waahah\u003c/a\u003e\u003c/h3\u003e\n\u003chr /\u003e\n\n![](https://s2.loli.net/2025/04/01/naCU38g5qI9wANK.png)\n\n### 特性\n- ✅ 跨浏览器支持 （Web 扩展 API）\n\n- 🌈 代码更改时自动构建和 HMR 热重载\n\n- 📦 自动打包特定于浏览器的构建文件\n\n- 📄 浏览器定制清单生成\n\n- 🎨 与前端框架无关\n\n- 🤖 自动发布\n\n- ✨ 持续集成\n\n- 🥢 SASS 样式\n\n- 🎯 ES6 模块支持\n\n- 📊 智能重新加载\n  \n\n### 浏览器支持\n\n| [![Chrome](https://s2.loli.net/2025/03/31/rAg93eNCOj8P54y.png)](/) | [![Firefox](https://s2.loli.net/2025/03/31/yJiWdqaP6Y5ozsr.png)](/) | [![Opera](https://s2.loli.net/2025/03/31/qKPSGrilQvmgy9p.png)](/) | [![Edge](https://s2.loli.net/2025/03/31/KTsyfa3QDZ6o9dn.png)](/) | [![Yandex](https://s2.loli.net/2025/03/31/arqyo6B2w7VeAld.png)](/) | [![Brave](https://s2.loli.net/2025/03/31/YlTZOBo5AsWqSia.png)](/) | [![vivaldi](https://s2.loli.net/2025/03/31/a9OmnPAipo6F7Yz.png)](/) |\n| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ |\n| 79 \u0026 later ✔                                                 | 52 \u0026 later ✔                                                 | 36 \u0026 later ✔                                                 | 79 \u0026 later ✔                                                 | Latest ✔                                                     | Latest ✔                                                     | Latest ✔                                                     |\n\n### 🚀 快速开始\n\n使用 [vext-cli](https://github.com/waahah/vext-cli) 创建一个新的项目非常简单，只需运行以下命令：\n\n```bash\nnpm install -g create-vext\n# 或者使用 yarn\nyarn global add create-vext\n# 创建新项目\nvext create \u003cproject-name\u003e\n```\n\n\n### 📦 前置要求\n\n- `node \u003e= 18` \n- `npm 9.x+`\n\n\n### 🔧 安装依赖\n\n```bash\ngit clone https://gitee.com/waahah/VExt.git\ncd VExt\nnpm install\n```\n\n\n### 开发模式\n\n```bash\nnpm run dev           # 启动开发服务器（HMR）\nnpm run watch:firefox # Firefox热更新构建\nnpm run watch:chrome  # Chrome热更新构建\n```\n\n\n### 生产构建\n\n```bash\nnpm run build:firefox  # Firefox生产构建\nnpm run build:chrome   # Chrome生产构建\n```\n\n\n### 本地运行\n\n```bash\nnpm run start:firefox  # 启动Firefox测试实例\nnpm run start:chrome   # 启动Chrome测试实例\n```\n运行后会启动对应浏览器，并自动加载运行项目。\n\n\n### 代码质量\n\n```bash\nnpm run lint  # 执行构建并代码校验\n```\n\n\n### 打包ZIP\n```bash\nnpm run pack:firefox  # Firefox打包\nnpm run pack:chrome   # Chrome打包\n```\n打包后的文件会输出到 `web-ext-artifacts/` 目录。\n\n\n### CRX打包\n```bash\nnpm run pack:crx  # 生成.crx扩展包（需配置scripts/crx-pack.js）\n```\n\n\n### 签名发布\n```bash\nnpm run sign:firefox  # 签名发布Firefox扩展（需配置API密钥）\nnpm run sign:chrome   # 签名发布Chrome扩展（需配置Web Store凭据）\n```\n自动上传扩展商店签名并发布，签名后的.XPI文件会输出到 `web-ext-artifacts/` 目录。\n\n\n### ⚙️ 配置说明\n1. 环境模式：更改manifest文件\n2. 构建输出：构建产物默认生成至/dist目录\n3. 签名配置：需在package.json中配置以下凭证：\n```\nFirefox: \u003cyour-jwt-issuer\u003e 和 \u003cyour-jwt-secret\u003e\nChrome:\n\u003cyour-client-id\u003e\n\u003cyour-client-secret\u003e\n\u003cyour-refresh-token\u003e\n\u003cyour-extension-id\u003e\n```\n- `firefox`获取API密钥请查看[此指南](https://extensionworkshop.com/documentation/develop/web-ext-command-reference/#web-ext-sign)\n- `chrome`获取API密钥请查看[此指南](https://github.com/fregante/chrome-webstore-upload-keys)\n\n\n### 持续集成\n\n可以通过在 GitHub Actions 中添加以下 secrets 来同时自动发布到 Chrome Web Store 和 Mozilla Addons：\n\n- **CLIENT_ID** 和 **CLIENT_SECRET** 以及来自 Google APIs 的 **REFRESH_TOKEN **和 **EXTENSION-ID**\n- **WEB_EXT_API_KEY** 和来自 AMO 的 **WEB_EXT_API_SECRET**\n\nGitHub Actions 工作流将会：\n\n- 构建扩展\n- 将扩展部署到两个商店\n\n\n借助包含的 [GitHub Action](https://github.com/waahah/VExt/actions) 工作流，CI可以：\n\n- 在有新的 tag 提交时触发\n- 手动触发，只需点击 Actions 标签页中的 “Run workflow”\n\n\n\u003e 立即开始构建跨浏览器扩展项目！ ✨\n\n### 🧹使用此项目构建的扩展\n- [Meow](https://github.com/waahah/Meow)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwaahah%2Fvext","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwaahah%2Fvext","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwaahah%2Fvext/lists"}