mirror of
https://github.com/zadam/trilium.git
synced 2025-11-01 10:55:55 +01:00
build(electron-forge): execute electron-forge commands in our "build" output context
since we build TS and webpack ourselves and are not using any electron-forge plugins (at least at the moment) -> we should use the "build" folder as build context for electron-forge: in comparison to running electron-forge in the root folder of the project, this avoids electron-forge from packing the source code multiple times (e.g. once as uncompiled TS, then as compiled JS, and then (partially) a third time as webpack bundled JS files), same as some of the assets. to achieve this, we run our usual TS/Webpack build process, but then install the npm dependencies *inside* the build folder (as otherwise electron-forge would choke on the missing node_modules it and abort building). In theory we could avoid cd-ing into the build folder, by providing the "dir" as argument to electron-forge's CLI -- BUT that wouldn't play well with our CI, where we are passing --arch and --platform options to it, which need to come *before* the dir argument. since we now cd into the "build" folder, we also need to adjust the path in package.json "main" again
This commit is contained in:
@@ -30,6 +30,7 @@ try {
|
||||
"./package.json",
|
||||
"./LICENSE",
|
||||
"./README.md",
|
||||
"./forge.config.cjs",
|
||||
"./src/views/",
|
||||
"./src/etapi/etapi.openapi.yaml",
|
||||
"./src/routes/api/openapi.json",
|
||||
|
||||
Reference in New Issue
Block a user