mirror of
https://github.com/TecharoHQ/anubis.git
synced 2025-08-03 17:59:24 -04:00
chore(web): handle building multiple JS entrypoints and web workers
Signed-off-by: Xe Iaso <me@xeiaso.net>
This commit is contained in:
parent
c5618a0b2a
commit
b499aaab68
14
web/build.sh
14
web/build.sh
@ -8,7 +8,7 @@ LICENSE='/*
|
|||||||
@licstart The following is the entire license notice for the
|
@licstart The following is the entire license notice for the
|
||||||
JavaScript code in this page.
|
JavaScript code in this page.
|
||||||
|
|
||||||
Copyright (c) 2025 Xe Iaso <me@xeiaso.net>
|
Copyright (c) 2025 Xe Iaso <xe.iaso@techaro.lol>
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
@ -36,9 +36,9 @@ for the JavaScript code in this page.
|
|||||||
mkdir -p static/locales
|
mkdir -p static/locales
|
||||||
cp ../lib/localization/locales/*.json static/locales/
|
cp ../lib/localization/locales/*.json static/locales/
|
||||||
|
|
||||||
esbuild js/main.mjs --sourcemap --bundle --minify --outfile=static/js/main.mjs "--banner:js=${LICENSE}"
|
for file in js/*.mjs js/worker/*.mjs; do
|
||||||
gzip -f -k -n static/js/main.mjs
|
esbuild "${file}" --sourcemap --bundle --minify --outfile=static/"${file}" --banner:js="${LICENSE}"
|
||||||
zstd -f -k --ultra -22 static/js/main.mjs
|
gzip -f -k -n static/${file}
|
||||||
brotli -fZk static/js/main.mjs
|
zstd -f -k --ultra -22 static/${file}
|
||||||
|
brotli -fZk static/${file}
|
||||||
esbuild js/bench.mjs --sourcemap --bundle --minify --outfile=static/js/bench.mjs
|
done
|
||||||
|
Loading…
x
Reference in New Issue
Block a user