Better export char variants data

This commit is contained in:
Belleve Invis 2020-05-17 18:15:08 -07:00
parent 27b1888da6
commit da935d9e17
4 changed files with 98 additions and 40 deletions

View file

@ -6,7 +6,9 @@ const getCharMapAndSupportedLanguageList = require("./supported-languages");
const version = require("../../package.json").version;
const charMapPath = process.argv[2];
const exportPath = process.argv[3];
const charMapItalicPath = process.argv[3];
const charMapObliquePath = process.argv[4];
const exportPath = process.argv[5];
main().catch(e => {
console.error(e);
process.exit(1);
@ -16,6 +18,10 @@ main().catch(e => {
async function main() {
const variantsData = await parseVariantsData();
const ligationData = await parseLigationData();
const cl = await getCharMapAndSupportedLanguageList(charMapPath);
const cl = await getCharMapAndSupportedLanguageList(
charMapPath,
charMapItalicPath,
charMapObliquePath
);
await fs.writeJson(exportPath, { version, variantsData, ligationData, ...cl }, { spaces: 2 });
}