Add bunext playground for local component development

Runs at http://localhost:7010 via bun run dev. The playground imports the library from src through a committed symlink and tsconfig path alias, so component edits hot-reload without a build step. It has its own install root and is excluded from the published package.
This commit is contained in:
2026-10-19 04:23:07 +01:00
parent 46049c5e15
commit 73a25f54c2
18 changed files with 1348 additions and 5 deletions
+4
View File
@@ -15,6 +15,9 @@
| `bun run typecheck` | `tsc --noEmit` - must be clean before finishing any change |
| `bun test src` | Unit tests (`src/**/*.test.ts`) |
| `bun run compile` | Clean build into `dist/` + post-compile step |
| `bun run dev` | Start the playground in `dev/` at http://localhost:7010 |
| `bun run dev:types` | `tsc --watch`, for consumers working against `dist/` |
| `bun run dev:typecheck` | Typecheck the playground (`dev/tsconfig.json`) |
| `./publish.sh "msg"`| Typecheck → test → compile → `git commit/push` → `bun publish` |
`publish.sh` pushes and publishes - only run it when explicitly asked. Bump `version` in `package.json` before publishing.
@@ -37,6 +40,7 @@
| `src/(partials)/`, `src/(functions)/`, `src/(utils)/` | Internal helpers, not meant for direct import |
| `src/types.ts` | Shared types/constants |
| `scripts/post-compile.ts` | Copies `base.css`, adds `.js` to relative imports, prepends `"use client"` |
| `dev/` | Local bunext playground, own `node_modules`/lockfile; never published. `dev/twui -> ../src` drives HMR for library edits |
## Public API Rules (MANDATORY)