A small Bun and TypeScript project built as a testbed for two ideas:
- serving a simple Express.js app
- bundling HTML, CSS, and JavaScript into a single inlined HTML file
The original goal was to experiment with a basic static-file builder. To make the output easy to test, the project grew into a small browser game powered by a lightweight custom game engine. It is intentionally simple and is meant as a practical playground rather than a full product.
- Builds a single self-contained HTML file from separate source files
- Serves the generated page with Bun and Express
- Runs a small canvas-based game where the player moves a paddle to catch falling flakes
- Shows a score counter and uses a custom game loop for input, updates, and drawing
src/app.tsstarts the web server and serves the generated pagesrc/build-inline.tsassembles the HTML, CSS, and JavaScript intopublic/index.inline.htmlsrc/core/engine.jscontains the small game enginesrc/scripts/client.jscontains the game logicsrc/styles/andsrc/views/contain the source assets used by the builder
- Bun
bun installbun run src/build-inline.tsThis generates public/index.inline.html from the source files.
bun run src/app.tsOpen the server in your browser after it starts.
- The project is intentionally small and experimental.
- The builder is focused on simple local workflows rather than a general-purpose packaging system.
- The game exists mainly as a test case for the builder and rendering loop.