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:
@@ -78,6 +78,26 @@ bun test src
|
||||
bun run compile # tsc → dist/, then scripts/post-compile.ts
|
||||
```
|
||||
|
||||
### Playground
|
||||
|
||||
`dev/` is a local [bunext](https://git.tben.me/Moduletrace/bunext) app that imports the library straight from `src/` (through the committed `dev/twui` symlink and a tsconfig path alias), so component edits hot-reload without running `tsc`. It has its own `node_modules` and is excluded from the published package by the `files` whitelist.
|
||||
|
||||
```sh
|
||||
cd dev
|
||||
bun install
|
||||
cd ..
|
||||
bun run dev # http://localhost:7010
|
||||
```
|
||||
|
||||
Install the library dependencies at the repo root first: the symlinked sources resolve `react`, `tailwind-merge`, `lucide-react` and the optional peers from the root `node_modules`.
|
||||
|
||||
Other useful scripts:
|
||||
|
||||
```sh
|
||||
bun run dev:types # tsc --watch, for consumers working against dist/
|
||||
bun run dev:typecheck # typecheck the playground pages and the sources they import
|
||||
```
|
||||
|
||||
### Publishing
|
||||
|
||||
```sh
|
||||
|
||||
Reference in New Issue
Block a user