chore: unify zip installs around dist

This commit is contained in:
admin123 2026-05-25 16:48:59 +08:00
parent 1a7b025aee
commit 3a80ef9859
6 changed files with 11 additions and 13 deletions

View File

@ -104,7 +104,7 @@ npm run write:latest
2. 打开 `chrome://extensions`
3. 打开右上角 `开发者模式`
4. 点击 `加载已解压的扩展程序`
5. 选择解压后的插件文件夹
5. 选择解压后的 `dist/` 文件夹
安装后请确认扩展 ID 是:

View File

@ -73,7 +73,7 @@ The pipeline uses the tag as the release version. Recommended format: `0.MMDD.N`
2. Open `chrome://extensions`.
3. Enable developer mode.
4. Click `Load unpacked`.
5. Select the unzipped folder.
5. Select the unzipped `dist/` folder.
6. Confirm the extension ID is `pkjopdibdnomhogjheclhnknmejccffg`.
## Notes

View File

@ -18,9 +18,9 @@
1. 在桌面上找到这个压缩包
2. **右键** → 选择"解压到当前文件夹"(或"Extract Here"
3. 会多出一个文件夹,名字类似 `star-chart-search-enhancer-internal`
3. 会多出一个文件夹,名字`dist`
⚠️ **重要**:这个文件夹要一直放在桌面,不要删、不要改名
⚠️ **重要**:这个 `dist` 文件夹要一直放在桌面,不要删、不要改名
---
@ -37,9 +37,9 @@
4. 点击左上角出现的 **"加载已解压的扩展程序"**
5. 选择刚才解压出来的插件文件夹
5. 选择刚才解压出来的 `dist` 文件夹
⚠️ **重要**:如果文件夹里能看到 `manifest.json``content``background``popup` 这些文件和文件夹,说明选对了。
⚠️ **重要**:如果 `dist` 文件夹里能看到 `manifest.json``content``background``popup` 这些文件和文件夹,说明选对了。
6. 看到绿色的插件卡片出现,就装好了!
@ -122,7 +122,7 @@ https://xingtu.cn/ad/creator/market
- 解压下载到的新版本 zip
- 打开 `chrome://extensions`
- 找到 `Star Chart Search Enhancer`
- 点击 **"重新加载"**,或重新选择解压后的新插件文件夹
- 点击 **"重新加载"**,或重新选择解压后的 `dist` 文件夹
---
@ -138,7 +138,7 @@ https://xingtu.cn/ad/creator/market
⚠️ **如果重新加载后还是旧版本**
- 先点击插件卡片的 **"移除"** 删除旧版本
- 然后重新点击 **"加载已解压的扩展程序"**
- 再次选择新解压出来的插件文件夹
- 再次选择新解压出来的 `dist` 文件夹
---

View File

@ -6,7 +6,7 @@ import yazl from "yazl";
export async function createReleaseArchive({
archivePath,
rootDirName = "star-chart-search-enhancer-internal",
rootDirName = "dist",
sourceDir
}) {
const zip = new yazl.ZipFile();

View File

@ -6,7 +6,7 @@ import { describe, expect, test } from "vitest";
import { createReleaseArchive } from "../scripts/package-release-archive.mjs";
describe("package-release-archive", () => {
test("creates a zip archive with a top-level release folder", async () => {
test("creates a zip archive with a top-level dist folder", async () => {
const tempDir = await mkdtemp(path.join(os.tmpdir(), "release-archive-"));
const sourceDir = path.join(tempDir, "source");
const archivePath = path.join(tempDir, "archive.zip");
@ -21,8 +21,6 @@ describe("package-release-archive", () => {
const archive = await readFile(archivePath);
expect(archive.byteLength).toBeGreaterThan(0);
expect(archive.toString("utf8")).toContain(
"star-chart-search-enhancer-internal/hello.txt"
);
expect(archive.toString("utf8")).toContain("dist/hello.txt");
});
});