This commit is contained in:
TheGiddyLimit
2024-01-01 19:34:49 +00:00
parent 332769043f
commit 8117ebddc5
1748 changed files with 2544409 additions and 1 deletions

View File

@@ -0,0 +1,26 @@
import * as fs from "fs";
import * as ut from "../node/util.js";
async function main () {
console.log(`##### Validating language fonts #####`);
const json = ut.readJson("./data/languages.json");
const errors = [];
json.languageScript.forEach(lang => {
if (!lang.fonts?.length) return;
lang.fonts
.filter(path => !fs.existsSync(path))
.forEach(path => errors.push(`languageScript "${lang.name}" font path "${path}" does not exist!`));
});
if (errors.length) {
errors.forEach(err => console.error(`\t${err}`));
return false;
}
return true;
}
export default main();