feat: 完成 v0.6.0 墨呈品牌迁移

This commit is contained in:
SkyJourney
2026-08-02 10:09:14 +08:00
parent 58f87cc19f
commit 9a2aa3c341
39 changed files with 451 additions and 81 deletions
+17 -1
View File
@@ -1,7 +1,14 @@
import { build } from "esbuild";
import { copyFile } from "node:fs/promises";
import { copyFile, readFile } from "node:fs/promises";
import { fileURLToPath } from "node:url";
const productBrand = JSON.parse(
await readFile(
fileURLToPath(new URL("../../../product.json", import.meta.url)),
"utf8"
)
);
await build({
entryPoints: ["src/main.ts"],
bundle: true,
@@ -9,6 +16,15 @@ await build({
format: "esm",
external: ["electron"],
outfile: "dist/main.js",
define: {
__APP_ID__: JSON.stringify(productBrand.appId),
__APP_ENGLISH_NAME__: JSON.stringify(productBrand.englishName),
__APP_DISPLAY_NAME__: JSON.stringify(productBrand.displayName),
__APP_WINDOW_TITLE__: JSON.stringify(productBrand.windowTitle),
__APP_LEGACY_DISPLAY_NAME__: JSON.stringify(
productBrand.legacyDisplayName
)
},
banner: {
js: [
'import { createRequire as __mdToPdfCreateRequire } from "node:module";',