@adhipk/pomelo
v0.1.0
Published
Watch, build, and serve a directory of Markdown files with Bun and Pandoc.
Readme
mdserve
Recursively converts Markdown to neighboring HTML files with Pandoc, watches for changes, and serves the directory on localhost using Bun's built-in HTTP server.
Run with bunx
Requires bun and pandoc:
bunx @adhipk/pomelo
bunx @adhipk/pomelo path/to/site
bunx @adhipk/pomelo path/to/site --port 8080For local development, run the source directly:
bun run mdserve.ts path/to/siteBuild
Build on the machine where the binary will run:
bun run buildThe output is pomelo. The only runtime dependency is pandoc; the compiled binary includes Bun and serves files directly.
Run the compiled binary
./pomelo
./pomelo path/to/site
./pomelo path/to/site --port 8080When stopped, it deletes only HTML files that did not exist before it started. Existing HTML files may be rebuilt but are never deleted.
