代码拉取完成,页面将自动刷新
import { readFile } from "fs/promises";
import { FontStyle } from "shiki";
async function main() {
const path = "node_modules/shiki/dist/themes/light-plus.mjs";
const text = await readFile(path, { encoding: "utf8" });
const match = text.match(/#[0-9A-Za-z]+/g);
if (match) {
const set = new Set(match);
for (const m of Array.from(set).sort()) {
console.log(
`.skc-${m.substring(1).toLowerCase()} { color: ${m.toUpperCase()} }`,
);
}
}
for (const key in FontStyle) {
if (isNaN(Number(key))) {
console.log(`.skf-${key.toLocaleLowerCase()} { }`);
}
}
}
main();
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。