The simplest Markdown To PDF Converter you've ever seen. No unnecessary frameworks, no BS, no fucking API calls, definitely no React. Website is ~370 KB gzip compressed.
Woprking - Converts a Markdown string/file to HTML using comrak-wasm, styles using GitHub Markdown CSS.
Automatically lints pushed code to Google TypeScript standard using gts.
Requirements:
To run locally, first clone the repository:
git clone --depth 1 https://github.com/chu23465/markdown-to-pdfThen, to install dependencies:
cd markdown-to-pdf
bun installThere's a known bug in bun (Windows) that surfaces as a EINVAL lockfile error. If the working project directory is not in the primary drive where the OS install is located, it sometimes errors out. If that happens during install:
bunx jsr install @nick/comrak --npmTo run in Debug mode:
bun run ./debug.htmlVarious helper scripts
bun run <scriptname>Scripts:-
| Script Name | Function |
|---|---|
| devDebug | Lints and runs debug.html |
| debugBundle | Debug bundler |
| bundle | Production ready build folder for distribution |
| prodTest | Tests production build in browser |
| lint | Google TypeScript standard linting using gts |
| clean | Clean gts output files |
| fix | Formats files according to Google TypeScript |
| typecheck | Type checking using tsc |
This project was created using bun init. Bun is a fast all-in-one JavaScript runtime.
Warning
There is some absolutely cursed behavior in index.ts. Stay away for the sake of your sanity.