Cut filesize by 50% by removing newlines and spaces

...really
This commit is contained in:
Oliver Blanthorn 2026-06-05 17:41:05 +02:00
parent 0067efeccc
commit 41ef1726f0
No known key found for this signature in database
GPG key ID: 2BB8C36BB504BFF3
2 changed files with 8 additions and 0 deletions

View file

@ -64,6 +64,7 @@ if [ "$QUICK_BUILD" != "1" ]; then
"$(yarn bin)/typedoc" --json src/.metadata.generated.json --mode file \
--exclude 'src/.excmds_*.generated.ts' --ignoreCompilerErrors \
src/excmds.ts src/lib/config.ts
node scripts/minify_json.js src/.metadata.generated.json
node -e "var fs=require('fs');fs.writeFileSync('src/.themes.generated.json',JSON.stringify(fs.readdirSync('src/static/themes')))"
printf 'export * from "./lib/metadata"\n' > src/.metadata.generated.ts

7
scripts/minify_json.js Executable file
View file

@ -0,0 +1,7 @@
#!/usr/bin/env node
require("fs").writeFileSync(
process.argv[2],
JSON.stringify(
JSON.parse(require("fs").readFileSync(process.argv[2], "utf8")),
),
)