Panagiotis Papadopoulos
75431ca634
build: make running of npm ci in build scripts configurable
...
* moved the running of npm ci from copy-dist to cleanupNodeModules
* added flag to disable it (necessary for electron-forge)
2025-03-27 00:00:41 +01:00
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
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
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
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
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
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
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
607f9096aa
build: output into "build" folder again → "dist" will be used for the final output in archive form
...
this will allow for cleaner separation -> build for the output from the build stage (i.e. TS/Webpack + asset copying) and dist for the archive format of the build folder
2025-03-09 18:59:54 +01:00
Panagiotis Papadopoulos
907b8c503e
build: copy package-lock.json into dist folder as well
2025-03-07 23:14:56 +01:00
Panagiotis Papadopoulos
e389592017
build(copy-dist): copying build folder is not required anymore
...
TS and Webpack build into the dist folder directly now
2025-03-07 23:14:56 +01:00
Panagiotis Papadopoulos
3032156b45
build(copy-dist): execute code in try/catch -> get rid of function
...
since we don't export this anywhere, might as well just call the steps directly
2025-03-07 23:14:56 +01:00
Panagiotis Papadopoulos
d75cf8c11e
build(copy-dist): consolidate nodeModules copying into a single loop
2025-03-07 23:14:56 +01:00
Panagiotis Papadopoulos
a816abb372
build(copy-dist): use sync copying
...
since this is a "standalone" script we are running and no other JS scritps are running "in the background", there's no real benefit for async here.
2025-03-07 23:14:56 +01:00
Panagiotis Papadopoulos
37f1525d0e
build(copy-dist): remove unused paths
2025-03-07 23:14:56 +01:00
Panagiotis Papadopoulos
dbeae62709
build(copy-dist): simplify "copyNodeModuleFileOrFolder" copying
...
there's no benefit from stripping "node_modules/" from the string, to later add it again using the `DEST_DIR_NODE_MODULES` constant
=> just copy directly into the `DEST_DIR` folder and preserver the `node_modules` part in the path
2025-03-07 23:14:56 +01:00
Panagiotis Papadopoulos
ac3e96291a
build(copy-dist): simplify "build" copying
...
there's no need to read the folder structure and then copy each single file in a loop
=> just copy the whole folder and be done with it :-)
2025-03-07 23:14:56 +01:00
Panagiotis Papadopoulos
9ac451e2b2
build(copy-dist): consolidate files and folder copying into one asset copying job
...
there's no benefit in having them split up like before
2025-03-07 23:14:56 +01:00
Panagiotis Papadopoulos
dbc2df0820
build(copy-dist): consolidate folder copying
...
the "srcDirsToCopy" block is useless now, we can just use the previous dirsToCopy to achieve the exact same thing
2025-03-07 23:14:56 +01:00
Panagiotis Papadopoulos
24382d8176
build(copy-dist): avoid copying over the app dir into dist
...
we have the bundled "app-dist" already in the "dist", copying over the original unbundled "app" folder serves no benefit here
2025-03-07 23:14:56 +01:00
Panagiotis Papadopoulos
af5e4ee3b5
build(copy-dist): copy over required folders/files from "public" folder
2025-03-07 23:14:56 +01:00
Panagiotis Papadopoulos
135101f57b
build(copy-dist): do not copy build folder into src folder
...
stop the build folder from being copied into the dist/src subfolder
→ there is no sense in doing that
→ the contents of the build folder are corretly copied previously already (see line 26ff)
2025-03-07 23:14:56 +01:00
Panagiotis Papadopoulos
60a2b56636
chore(copy-dist): removee unnecesary copy of tsconfig.webpack.json
...
webpack bundling already ran before this script, so there is no need to copy this file over
2025-03-07 23:14:56 +01:00
Panagiotis Papadopoulos
e7d204dfd2
chore(copy-dist): remove now unneeded manual copying of bootstrap dir
...
webpack is taking care of that for us
2025-02-22 11:56:56 +01:00
Panagiotis Papadopoulos
dd4f8a8c27
chore(copy-dist): "unpack" log messages before printing
...
previously it was printin all messages as part of an array, i.e.
["message"]
After spreading the array, we get the desired out
"message"
2025-02-15 13:08:13 +01:00
Elian Doran
9299f90b85
feat(docs): internal API docs
2025-02-15 00:33:12 +02:00
Panagiotis Papadopoulos
010783102a
build: fix missing copying of etapi.openapi.yaml into dist folder
...
fixes build via electron-forge
2025-02-12 23:09:20 +01:00
Elian Doran
2cc7113c2c
refactor(deps): get rid of print-this
2025-02-01 00:52:46 +02:00
Panagiotis Papadopoulos
ed33b72f57
chore(assets): remove manual provision of knockout
...
this is only used in setup.ts and there it is already packed by webpack – so no need to manually provide it as static asset anymore
2025-01-29 08:48:03 +01:00
Elian Doran
7a3a5141af
fix(geomap): not working on electron
2025-01-22 23:08:25 +02:00
Elian Doran
eaacdb57d1
fix(build): add back copying canvas dist files
2025-01-18 11:19:35 +02:00
Elian Doran
7d3f506efb
refactor(deps): use webpack import for canvas
2025-01-18 11:09:57 +02:00
Elian Doran
e7eb385b8f
refactor(deps): integrate force-graph into webpack
2025-01-17 20:21:52 +02:00
Elian Doran
25e0dc3355
fix(electron): copy dist not working due to missing lib
2025-01-11 17:04:07 +02:00
Elian Doran
4cbb529fd4
chore(prettier): fix all files
2025-01-09 18:07:02 +02:00
Elian Doran
7a2b5e731e
chore(code): fix more js & ts files
2024-12-22 15:45:54 +02:00