Panagiotis Papadopoulos
1ceaafa1e8
build: move cleanupNodeModules to its own file
...
this is necessary, since for Docker and electron-forge, we need to run this as an extra step after copy-dist
for electron-forge: after it is done with its own "pruning", as we otherwise would need to also take care of certain electron related pruning
for Docker: as a last step in the build stage
2025-03-26 08:12:48 +01:00
Panagiotis Papadopoulos
cd8401089d
build(copy-trilium): update list of useless deps paths
...
* image-q/demo -> doesn't exist anymore (and even if it did - previous cleanup step, would've removed this anyways)
* @excalidraw/excalidraw/dist/* -> updated to point to the dev folder
* boxicons -> only fonts and css folders are used, so remove the other ones
* jimp -> updated paths and removed non-existent path
fixing here for historical reasons, next step is to move these over to copy-dist.ts
2025-03-26 08:12:48 +01:00
Panagiotis Papadopoulos
6749d8084b
build(copy-dist): add further cleanupNodeModules functionality
...
deleting of ts and map files from node_modules folder,
adapted from copy-trilium.sh.
2025-03-26 08:12:48 +01:00
Panagiotis Papadopoulos
8275f3c867
build(copy-dist): execute filterableDirs cleanup in one chain
2025-03-26 08:12:48 +01:00
Panagiotis Papadopoulos
a9643174cc
build(copy-dist): add further folders to list of filterableDirs
...
same as before, but some of the modules use singular/plural, so just check for both
2025-03-26 08:12:48 +01:00
Panagiotis Papadopoulos
6260ea1532
build(copy-dist): add initial cleanupNodeModules functionality
...
adapted from copy-trilium.sh
2025-03-26 08:12:48 +01:00
Panagiotis Papadopoulos
bee7793d32
build(copy-trilium): remove now unnecessary package.json patching
...
this is not needed anymore since commit 6b9d8f0d677763f29d29abd0816b1a5d40e858c8
2025-03-26 08:12:48 +01:00
Panagiotis Papadopoulos
6fb270e4f8
build(copy-dist): copy over existing node_modules
...
helps avoiding downloading the packages a 2nd time during our prune stage
2025-03-26 08:12:48 +01:00
Panagiotis Papadopoulos
8977492981
build(copy-dist): move "pruning" to copy-dist from copy-trilium.sh
2025-03-26 08:12:48 +01:00
Panagiotis Papadopoulos
1640000291
build(build-server): move "build:prepare-dist" call to build-server from copy-trilium
...
in preparation to get rid of the file altogether - rest of the functionality will be merged into copy-dist.ts
2025-03-26 08:12:48 +01:00
Panagiotis Papadopoulos
17d5fdb4b0
build(copy-dist): get rid of manual node_module copying
...
this is useless at the moment, as all build processes are running "npm ci --omit=dev" anyways, i.e. they will just install everything remaining again
2025-03-26 08:12:48 +01:00
Panagiotis Papadopoulos
1e713469e7
build(server): bump to latest node v22.14.0 -> fixes EBADENGINE warning
...
npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE package: 'node-abi@4.2.0',
npm warn EBADENGINE required: { node: '>=22.12.0' },
npm warn EBADENGINE current: { node: 'v20.18.1', npm: '10.8.2' }
npm warn EBADENGINE }
2025-03-26 08:12:22 +01:00
Elian Doran
34043a8a70
feat(signing): use environment variables for the executable path
2025-03-24 17:00:37 +02:00
Elian Doran
6f54ac7446
chore(ci): change signing log
2025-03-24 12:05:46 +02:00
Elian Doran
40f4fdab47
feat(ci): set up signing hook
2025-03-23 23:22:22 +02:00
Elian Doran
a709f68af9
chore(ci): set up node modules
2025-03-23 22:47:59 +02:00
Elian Doran
28c51cb38a
refactor(client): use webpack for mermaid
2025-03-22 02:15:09 +02:00
Elian Doran
b44bb4053c
refactor(deps): use webpack for jsplumb & panzoom
2025-03-20 21:51:03 +02:00
Panagiotis Papadopoulos
feb9fa03c3
chore(deps): move mind-elixir related packages to devDependencies
...
webpack takes care of bundling these, so we don't need the modules at runtime anymore
2025-03-19 20:03:24 +01:00
Elian Doran
a4ae0ba628
chore(build): add turndown-plugin-gfm to copy-dist
2025-03-19 19:23:43 +02:00
Elian Doran
e9a0c68a28
Merge branch 'develop' into build_improve-electron-forge_v3
2025-03-15 17:00:53 +02:00
Elian Doran
103b29d3de
Revert "fix(flatpak): try setting different bin to avoid sandbox issue"
...
This reverts commit a778ec617f2aa00cf763a0c5ca0387743bc5f6f0.
2025-03-15 13:44:30 +02:00
Panagiotis Papadopoulos
3b8c645cca
Merge branch 'develop' into build_improve-electron-forge_v3
2025-03-15 12:09:52 +01:00
Elian Doran
a778ec617f
fix(flatpak): try setting different bin to avoid sandbox issue
2025-03-15 13:01:28 +02:00
PChemGuy
df9a413ef8
Strip trailing backslash
...
%~dp0 always contains a trailing backslash. The way %DIR% is used in the following line, the trailing slash should be stripped. Alternatively, `%DIR%\\` may be replaced with `%DIR%`, but I would advice against. It is ok to have `%~dp0trilium-data`, which is a conventional pattern. Once %~dp0 is replaced with %DIR% (which is not really warranted here), stripping the trailing slash right after assignment is preferable.
2025-03-14 14:29:37 +03:00
PChemGuy
4971619b69
Missing quotes
2025-03-14 14:19:11 +03:00
Panagiotis Papadopoulos
b48fbbe583
build(copy-dist): copy over desktop.ejs for electron-forge as well
...
it is required for Flatpak/Deb/RPM Linux packages
2025-03-13 07:59:12 +01:00
Panagiotis Papadopoulos
4ce2c10d72
build(copy-dist): copy over the start scripts for now
2025-03-13 07:59:12 +01:00
Panagiotis Papadopoulos
6b9d8f0d67
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
2025-03-13 07:59:12 +01:00
Panagiotis Papadopoulos
d7aedfbd36
build(copy-dist): exit on any caught error to make sure copy-dist fails during CI if any error occurs
...
if we don't exit, it will just log the issue - however we *want* it to fail it there is an error, so that it doesn't continue in the CI
alternative would be to rethrow the error, but then we'd print the error into the logs twice :-)
closes https://github.com/TriliumNext/Notes/issues/1413
2025-03-12 09:52:42 +01:00
Panagiotis Papadopoulos
d088c8e5b2
build(copy-dist): fix path to excalidraw fonts
2025-03-12 08:57:05 +01:00
Elian Doran
cf76358dd7
fix(canvas): font loading
2025-03-11 23:03:34 +02:00
Panagiotis Papadopoulos
afe4fc2d1a
build(build-server): add more detail to status "echo"s
2025-03-09 18:59:54 +01:00
Panagiotis Papadopoulos
3450066214
build(build.sh): remove unused build script
...
this is not used anymore at all, it was replaced by GitHub CI Actions
it even mentions several other scripts, that got removed in the meantime as well
2025-03-09 18:59:54 +01:00
Panagiotis Papadopoulos
36fad35be5
build(build-server): rename archive name to the same naming scheme used in the Github CI
2025-03-09 18:59:54 +01:00
Panagiotis Papadopoulos
56340009ca
build(build-server): remove now unused DONTCOPY check
2025-03-09 18:59:54 +01:00
Panagiotis Papadopoulos
d110c8b067
build(build-server): add some status "echo"s
2025-03-09 18:59:54 +01:00
Panagiotis Papadopoulos
d8ad018819
build(build-server): also delete electron map files
2025-03-09 18:59:54 +01:00
Panagiotis Papadopoulos
33de342842
build(build-server): download and extract node in a single step
2025-03-09 18:59:54 +01:00
Panagiotis Papadopoulos
4bba061629
build(build-server): get rid of now unnecessary arch handling for node
...
directly use "ARCH" instead of creating 2 variables with the identical content as "ARCH"
2025-03-09 18:59:54 +01:00
Panagiotis Papadopoulos
87d37366e4
build(build-server): remove unnecessary copying of translations
...
already happens during build:prepare-dist step
2025-03-09 18:59:54 +01:00
Panagiotis Papadopoulos
1324cc2e53
build(build-server): add TODO remark
2025-03-09 18:59:54 +01:00
Panagiotis Papadopoulos
80d6cd0356
build(build-server): delete temp build dir copy in dist folder
2025-03-09 18:59:54 +01:00
Panagiotis Papadopoulos
e0413b528f
build(build-server): use a single "rm" command
2025-03-09 18:59:54 +01:00
Panagiotis Papadopoulos
19abd14058
build(build-server): use build dir for build and dist for final archive output
2025-03-09 18:59:54 +01:00
Panagiotis Papadopoulos
9bd31698e1
build(copy-trilium): use "|" as sed separator
...
allows us to avoid having to escape "/"
2025-03-09 18:59:54 +01:00
Panagiotis Papadopoulos
1ae5c43010
build(copy-trilium): do all the work inside build dir, no target directory needed anymore
...
-> all of these steps will eventually be merged with copy-dist script to have a unified copying script
2025-03-09 18:59:54 +01:00
Panagiotis Papadopoulos
f8b06f0634
build(copy-trilium): get rid of unecessary copying of files
...
-> already handled by "build:prepare-dist" step
2025-03-09 18:59:54 +01:00
Panagiotis Papadopoulos
930be2de05
build(copy-dist): copy LICENSE and README as well
...
copied over from copy-trilium.sh script
2025-03-09 18:59:54 +01:00
Panagiotis Papadopoulos
c89d86acb1
build(copy-trilium): use "build:prepare-dist" build script
2025-03-09 18:59:54 +01:00