fix: pre-cache to not include extra files

This commit is contained in:
Paul Makles 2022-03-25 11:17:04 +00:00
parent 3a12f92867
commit f9f0d5c55a
9 changed files with 71 additions and 222 deletions

22
scripts/locale.js Normal file
View file

@ -0,0 +1,22 @@
const { readdirSync } = require("fs");
console.log(
"var locale_keys = " +
JSON.stringify([
...readdirSync("node_modules/dayjs/locale")
.filter((x) => x.endsWith(".js"))
.map((x) => {
v = x.split(".");
v.pop();
return v.join(".");
}),
...readdirSync("external/lang")
.filter((x) => x.endsWith(".json"))
.map((x) => {
v = x.split(".");
v.pop();
return v.join(".");
}),
]) +
";",
);