wdwh
v1.12.25
Published
The Bun Frontend Framework.
Downloads
1,057
Maintainers
Readme
WDWH (Easier web dev without html)
The Bun frontend framework.
Designed to simplify static-site web development using TypeScript and Bun runtime.
The framework automatically converts src/app/**/index.tsx pages into HTML
during build, supports multi‑page projects, and bundles client-side code with
tailwind CSS.
For development you need the Bun runtime.
Install bun
Init project
bunx wdwh@latest initUsage
import { createSignal } from "wdwh";
const countSignal = createSignal(0);
function Counter() {
const count = countSignal.use();
return (
<>
<h2>{count}</h2>
<button onClick={() => countSignal.set((prev) => prev + 1)}>Increment</button>
</>
);
}Adding to project
1. Install wdwh
bun i wdwh@latest2. Add script dev build to package.json
{
"scripts": {
"dev": "wdwh dev",
"build": "wdwh build"
}
}3. Add files
src/app/index.tsxand additionalsrc/app/subfolders – allindex.tsxfiles are treated as separate pages and will produce/DIST_DIR/index.html,/DIST_DIR/foo/index.html, etc.src/app/App.tsxsrc/app/react.svg(favicon, can be any other image, bun path must be specify insrc/app/index.tsx)src/app/global.css(must contain@import "tailwindcss";)package.json(with scriptsdevbuild)tsconfig.json(fortypescript). The framework ships with strict settings and checks every page file during build.
Optional helper utilities
clsxbuild inuseSearchParam
