mirror of
https://github.com/DayuanJiang/next-ai-draw-io.git
synced 2026-01-02 14:22:28 +08:00
chore: bump version to 0.4.5 (#346)
* chore: bump version to 0.4.5 and add desktop app to README * style: auto-format with Biome --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
@@ -6,19 +6,19 @@
|
||||
const { cpSync, existsSync } = require("fs")
|
||||
const path = require("path")
|
||||
|
||||
module.exports = async function (context) {
|
||||
module.exports = async (context) => {
|
||||
const appOutDir = context.appOutDir
|
||||
const resourcesDir = path.join(
|
||||
appOutDir,
|
||||
context.packager.platform.name === "mac"
|
||||
? `${context.packager.appInfo.productFilename}.app/Contents/Resources`
|
||||
: "resources"
|
||||
: "resources",
|
||||
)
|
||||
const standaloneDir = path.join(resourcesDir, "standalone")
|
||||
const sourceNodeModules = path.join(
|
||||
context.packager.projectDir,
|
||||
"electron-standalone",
|
||||
"node_modules"
|
||||
"node_modules",
|
||||
)
|
||||
const targetNodeModules = path.join(standaloneDir, "node_modules")
|
||||
|
||||
@@ -29,11 +29,15 @@ module.exports = async function (context) {
|
||||
console.log("[afterPack] node_modules copied successfully")
|
||||
} else {
|
||||
console.error("[afterPack] Source or target directory not found!")
|
||||
console.error(` Source: ${sourceNodeModules} exists: ${existsSync(sourceNodeModules)}`)
|
||||
console.error(` Target dir: ${standaloneDir} exists: ${existsSync(standaloneDir)}`)
|
||||
console.error(
|
||||
` Source: ${sourceNodeModules} exists: ${existsSync(sourceNodeModules)}`,
|
||||
)
|
||||
console.error(
|
||||
` Target dir: ${standaloneDir} exists: ${existsSync(standaloneDir)}`,
|
||||
)
|
||||
throw new Error(
|
||||
"[afterPack] Failed: Required directories not found. " +
|
||||
"Ensure 'npm run electron:prepare' was run before building."
|
||||
"Ensure 'npm run electron:prepare' was run before building.",
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user