Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: merge copy-trilium.sh functionality into copy-dist.ts #1436

Draft
wants to merge 11 commits into
base: develop
Choose a base branch
from

Conversation

pano9000
Copy link
Member

@pano9000 pano9000 commented Mar 16, 2025

WIP that partially addresses #1174

-> moves functionality from copy-trilium.sh into cross-platform copy-dist.ts, so that we can get rid of one extra build script AND have other build processes also benefit from the copy-trilium.sh features (mainly "node_modules" cleanup -> which results in smaller file sizes for releases) -> this is currently only utilized for the "bare metal" Server build, but will now be available for all other builds as well

on a very first test, I got a reduction of 200+ MB of the node_modules folder this way

pano9000 added 11 commits March 16, 2025 02:35
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
…rom copy-trilium

in preparation to get rid of the file altogether - rest of the functionality will be merged into copy-dist.ts
helps avoiding downloading the packages a 2nd time during our prune stage
since we our own more "sophisticated" pruning during copy-dist, we need to set this to false, as otherwise build will fail
same as before, but some of the modules use singular/plural, so just check for both
deleting of ts and map files from node_modules folder,
adapted from copy-trilium.sh.
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant