docs: 更新文档及构建脚本

This commit is contained in:
claude-code-best
2026-04-04 21:09:21 +08:00
parent c99021d5a3
commit 02694918b5
6 changed files with 1357 additions and 85 deletions

View File

@@ -1,4 +1,4 @@
import { readdir, readFile, writeFile } from "fs/promises";
import { readdir, readFile, writeFile, cp } from "fs/promises";
import { join } from "path";
import { getMacroDefines } from "./scripts/defines.ts";
@@ -59,7 +59,12 @@ console.log(
`Bundled ${result.outputs.length} files to ${outdir}/ (patched ${patched} for Node.js compat)`,
);
// Step 4: Bundle download-ripgrep script as standalone JS for postinstall
// Step 4: Copy native .node addon files (audio-capture)
const vendorDir = join(outdir, "vendor", "audio-capture");
await cp("vendor/audio-capture", vendorDir, { recursive: true });
console.log(`Copied vendor/audio-capture/ → ${vendorDir}/`);
// Step 5: Bundle download-ripgrep script as standalone JS for postinstall
const rgScript = await Bun.build({
entrypoints: ["scripts/download-ripgrep.ts"],
outdir,