cn-font-split
Version:
划时代的字体切割工具,CJK与任何字符!支持 otf、ttf、woff2 字体多线程切割,完美地细颗粒度地进行包大小控制。A revolutionary font subetter that supports CJK and any characters! It enables multi-threaded subset of otf, ttf, and woff2 fonts, allowing for precise control over package size.
24 lines (23 loc) • 906 B
JavaScript
import { getCliParams as e } from "./gen/proto.mjs";
import { runInitScript as t } from "./init.mjs";
import { Command as n } from "commander";
import r from "set-value";
//#region src/cli.ts
e(process.argv, (e, i) => {
i.action(async (e) => {
let t;
t = process.versions.bun ? (await import("./bun/index.mjs")).fontSplit : (await import("./node/index.mjs")).fontSplit;
let n = { ...e };
Object.entries(n).forEach(([e, t]) => {
r(n, e, t);
}), await t(n);
}), e.usage("\ncn-font-split -i <字体地址> -o <文件夹地址>\ncn-font-split run -h # 查看更详细信息").description("").addCommand(new n("i").description("安装指定源 wasm32-wasip1@版本号").action(async () => {
await t();
})).addCommand(new n("ls").description("列出本地和远程信息").action(async () => {
await t();
}));
});
//#endregion
export {};
//# sourceMappingURL=cli.mjs.map