2 Star 3 Fork 0

gitone-dev/gitone

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
theme.ts 621 Bytes
一键复制 编辑 原始数据 按行查看 历史
ceshiyixiaba 提交于 2025-03-15 18:43 +08:00 . users
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();
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/gitone-dev/gitone.git
git@gitee.com:gitone-dev/gitone.git
gitone-dev
gitone
gitone
develop

搜索帮助