Fix #2028. Also add synchronization between Iosevka source vs website data

This commit is contained in:
be5invis 2023-10-08 13:18:07 -07:00
parent e99567060a
commit 3e513f7740
3 changed files with 27 additions and 2 deletions

View file

@ -0,0 +1,22 @@
import fs from "node:fs";
import { ssStrings } from "./generate-samples/templates/package-sample.mjs";
export default main;
async function main(args) {
let out = { tokens: [] };
for (const line of ssStrings) {
let outLine = [];
for (const [id, token] of line.entries()) {
if (id > 0) {
outLine.push({ text: " ", scopes: [] });
}
let combined = Array.from(token).join("");
outLine.push({ text: combined, scopes: ["dim"] });
}
out.tokens.push(outLine);
}
await fs.promises.writeFile(args.output, JSON.stringify(out, null, " "));
}