chore: unify zip installs around dist
This commit is contained in:
parent
1a7b025aee
commit
3a80ef9859
@ -104,7 +104,7 @@ npm run write:latest
|
|||||||
2. 打开 `chrome://extensions`
|
2. 打开 `chrome://extensions`
|
||||||
3. 打开右上角 `开发者模式`
|
3. 打开右上角 `开发者模式`
|
||||||
4. 点击 `加载已解压的扩展程序`
|
4. 点击 `加载已解压的扩展程序`
|
||||||
5. 选择解压后的插件文件夹
|
5. 选择解压后的 `dist/` 文件夹
|
||||||
|
|
||||||
安装后请确认扩展 ID 是:
|
安装后请确认扩展 ID 是:
|
||||||
|
|
||||||
|
|||||||
@ -73,7 +73,7 @@ The pipeline uses the tag as the release version. Recommended format: `0.MMDD.N`
|
|||||||
2. Open `chrome://extensions`.
|
2. Open `chrome://extensions`.
|
||||||
3. Enable developer mode.
|
3. Enable developer mode.
|
||||||
4. Click `Load unpacked`.
|
4. Click `Load unpacked`.
|
||||||
5. Select the unzipped folder.
|
5. Select the unzipped `dist/` folder.
|
||||||
6. Confirm the extension ID is `pkjopdibdnomhogjheclhnknmejccffg`.
|
6. Confirm the extension ID is `pkjopdibdnomhogjheclhnknmejccffg`.
|
||||||
|
|
||||||
## Notes
|
## Notes
|
||||||
|
|||||||
@ -18,9 +18,9 @@
|
|||||||
|
|
||||||
1. 在桌面上找到这个压缩包
|
1. 在桌面上找到这个压缩包
|
||||||
2. **右键** → 选择"解压到当前文件夹"(或"Extract Here")
|
2. **右键** → 选择"解压到当前文件夹"(或"Extract Here")
|
||||||
3. 会多出一个文件夹,名字类似 `star-chart-search-enhancer-internal`
|
3. 会多出一个文件夹,名字是 `dist`
|
||||||
|
|
||||||
⚠️ **重要**:这个文件夹要一直放在桌面,不要删、不要改名
|
⚠️ **重要**:这个 `dist` 文件夹要一直放在桌面,不要删、不要改名
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@ -37,9 +37,9 @@
|
|||||||
|
|
||||||
4. 点击左上角出现的 **"加载已解压的扩展程序"**
|
4. 点击左上角出现的 **"加载已解压的扩展程序"**
|
||||||
|
|
||||||
5. 选择刚才解压出来的插件文件夹
|
5. 选择刚才解压出来的 `dist` 文件夹
|
||||||
|
|
||||||
⚠️ **重要**:如果文件夹里能看到 `manifest.json`、`content`、`background`、`popup` 这些文件和文件夹,说明选对了。
|
⚠️ **重要**:如果 `dist` 文件夹里能看到 `manifest.json`、`content`、`background`、`popup` 这些文件和文件夹,说明选对了。
|
||||||
|
|
||||||
6. 看到绿色的插件卡片出现,就装好了!
|
6. 看到绿色的插件卡片出现,就装好了!
|
||||||
|
|
||||||
@ -122,7 +122,7 @@ https://xingtu.cn/ad/creator/market
|
|||||||
- 解压下载到的新版本 zip
|
- 解压下载到的新版本 zip
|
||||||
- 打开 `chrome://extensions`
|
- 打开 `chrome://extensions`
|
||||||
- 找到 `Star Chart Search Enhancer`
|
- 找到 `Star Chart Search Enhancer`
|
||||||
- 点击 **"重新加载"**,或重新选择解压后的新插件文件夹
|
- 点击 **"重新加载"**,或重新选择解压后的 `dist` 文件夹
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@ -138,7 +138,7 @@ https://xingtu.cn/ad/creator/market
|
|||||||
⚠️ **如果重新加载后还是旧版本**:
|
⚠️ **如果重新加载后还是旧版本**:
|
||||||
- 先点击插件卡片的 **"移除"** 删除旧版本
|
- 先点击插件卡片的 **"移除"** 删除旧版本
|
||||||
- 然后重新点击 **"加载已解压的扩展程序"**
|
- 然后重新点击 **"加载已解压的扩展程序"**
|
||||||
- 再次选择新解压出来的插件文件夹
|
- 再次选择新解压出来的 `dist` 文件夹
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
@ -6,7 +6,7 @@ import yazl from "yazl";
|
|||||||
|
|
||||||
export async function createReleaseArchive({
|
export async function createReleaseArchive({
|
||||||
archivePath,
|
archivePath,
|
||||||
rootDirName = "star-chart-search-enhancer-internal",
|
rootDirName = "dist",
|
||||||
sourceDir
|
sourceDir
|
||||||
}) {
|
}) {
|
||||||
const zip = new yazl.ZipFile();
|
const zip = new yazl.ZipFile();
|
||||||
|
|||||||
@ -6,7 +6,7 @@ import { describe, expect, test } from "vitest";
|
|||||||
import { createReleaseArchive } from "../scripts/package-release-archive.mjs";
|
import { createReleaseArchive } from "../scripts/package-release-archive.mjs";
|
||||||
|
|
||||||
describe("package-release-archive", () => {
|
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 tempDir = await mkdtemp(path.join(os.tmpdir(), "release-archive-"));
|
||||||
const sourceDir = path.join(tempDir, "source");
|
const sourceDir = path.join(tempDir, "source");
|
||||||
const archivePath = path.join(tempDir, "archive.zip");
|
const archivePath = path.join(tempDir, "archive.zip");
|
||||||
@ -21,8 +21,6 @@ describe("package-release-archive", () => {
|
|||||||
|
|
||||||
const archive = await readFile(archivePath);
|
const archive = await readFile(archivePath);
|
||||||
expect(archive.byteLength).toBeGreaterThan(0);
|
expect(archive.byteLength).toBeGreaterThan(0);
|
||||||
expect(archive.toString("utf8")).toContain(
|
expect(archive.toString("utf8")).toContain("dist/hello.txt");
|
||||||
"star-chart-search-enhancer-internal/hello.txt"
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user