diff --git a/package.json b/package.json index 8607d62..45f8a6d 100644 --- a/package.json +++ b/package.json @@ -4,17 +4,18 @@ "type": "module", "private": true, "bin": { - "lmc": "dist/index.js" + "lmc": "dist/index.js", + "ttsc": "dist/tts.js" }, "scripts": { "dev": "pnpm run bundle &>/dev/null && node dist/index.js", "check": "biome check --write && pnpm run tc", "clean": "rm -rf dist", - "build": "pnpm run check && pnpm run bundle --minify", - "build:bin": "pnpm run check && pnpm run bundle:bin --minify && pnpm run bin", - "bundle": "rolldown index.ts --dir=dist --platform=node", - "bundle:bin": "rolldown index.ts --dir=dist --platform=node --no-code-splitting --format=cjs", - "bin": "node --build-sea sea-config.json", + "build": "pnpm run check && pnpm run bundle --minify index.ts && pnpm run bundle --minify tts.ts", + "build:bin": "pnpm run check && pnpm run bundle:bin --minify index.ts && pnpm run bundle:bin --minify tts.ts && pnpm run bin", + "bundle": "rolldown --dir=dist --platform=node --transform.target=node22", + "bundle:bin": "rolldown --dir=dist --platform=node --no-code-splitting --format=cjs", + "bin": "node --build-sea sea-config.json && node --build-sea sea-config-tts.json", "tc": "tsc --noEmit --incremental" }, "devDependencies": { diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml deleted file mode 100644 index 5ed0b5a..0000000 --- a/pnpm-workspace.yaml +++ /dev/null @@ -1,2 +0,0 @@ -allowBuilds: - esbuild: true diff --git a/src/render/markdown.ts b/src/render/markdown.ts index 905c003..e3271ae 100644 --- a/src/render/markdown.ts +++ b/src/render/markdown.ts @@ -130,12 +130,12 @@ class LmcRenderer extends Renderer { override strong({ tokens }: Tokens.Strong) { const text = this.parser.parseInline(tokens); - return chalk.bold.rgb(254, 254, 254)(text); + return chalk.bold.rgb(245, 245, 245)(text); } override em({ tokens }: Tokens.Em) { const text = this.parser.parseInline(tokens); - return chalk.italic.rgb(254, 254, 254)(text); + return chalk.italic.rgb(245, 245, 245)(text); } override del({ tokens }: Tokens.Del) { @@ -144,7 +144,7 @@ class LmcRenderer extends Renderer { } override codespan({ text }: Tokens.Codespan) { - return chalk.bgRgb(165, 165, 190).black.bold(text); + return chalk.bgRgb(192, 192, 192).black.bold(text); } override link({ href, tokens }: Tokens.Link) { @@ -192,7 +192,8 @@ export async function renderMarkdown( const langs = md .match(/```\S+\n/g) - ?.map((lang) => lang.replace("```", "").trimEnd()); + ?.map((lang) => lang.replace("```", "").trimEnd()) + .sort(); if (langs && langs?.join() !== highligherLangs) { const { bundledThemes, bundledLanguages, bundledLanguagesAlias } =