mirror of
https://github.com/stoatchat/for-legacy-web.git
synced 2026-03-07 01:15:28 +00:00
fix: pre-cache to not include extra files
This commit is contained in:
22
scripts/locale.js
Normal file
22
scripts/locale.js
Normal 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(".");
|
||||
}),
|
||||
]) +
|
||||
";",
|
||||
);
|
||||
Reference in New Issue
Block a user