chore: update build scripts and refine markdown rendering

This commit is contained in:
mitchell 2026-06-07 16:11:08 -04:00
parent bbee38be80
commit 4912864a75
3 changed files with 12 additions and 12 deletions

View file

@ -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": {

View file

@ -1,2 +0,0 @@
allowBuilds:
esbuild: true

View file

@ -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 } =