chore(monorepo/electron): invoke copy-dist

This commit is contained in:
Elian Doran 2025-04-19 00:17:36 +03:00
parent 183cbc6daf
commit 27465275f6
No known key found for this signature in database
3 changed files with 13 additions and 2 deletions

View File

@ -1 +1,2 @@
build
data

View File

@ -20,7 +20,8 @@
"main": "index.js",
"scripts": {
"start": "cross-env NODE_OPTIONS=\"--import tsx\" TRILIUM_DATA_DIR=./data TRILIUM_ENV=dev electron ./src/electron-main.ts --inspect=5858 .",
"postinstall": "electron-rebuild"
"postinstall": "electron-rebuild",
"build:copy-dist": "tsx ./scripts/copy-dist.ts"
},
"dependencies": {
"better-sqlite3": "^11.9.1",
@ -31,6 +32,7 @@
"devDependencies": {
"@types/electron-squirrel-startup": "1.0.2",
"electron": "35.1.5",
"@electron/rebuild": "3.7.2"
"@electron/rebuild": "3.7.2",
"tsx": "4.19.3"
}
}

View File

@ -12,6 +12,14 @@ function log(...args: any[]) {
}
try {
/**
* Copy the server.
*/
fs.copySync("../server/build", DEST_DIR);
/**
* Copy assets.
*/
const assetsToCopy = new Set([
"./forge.config.cjs",
"./bin/electron-forge/desktop.ejs",