feat: 完成 v0.6.0 墨呈品牌迁移
This commit is contained in:
@@ -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";',
|
||||
|
||||
Reference in New Issue
Block a user