feat(web): dev server runs devknobs from the local checkout
Merged
ME
11d ago+242+242+012345678901234567890123456789-37-37-01234567890123456789
Summary
- the dev server now runs devknobs from a local checkout's source (
src/index.ts), so the site is the test bed for the panel and edits there reload the page - checkout is
DEVKNOBS_PATH(absolute or relative to the repo root), else../devknobsbeside the repo, which also fitsknobs.dev.<branch>worktrees - dev start logs which devknobs is in use; build, preview, ci and prod keep the pinned npm package
Test plan
- lint, format:check, typecheck, build
- build output has no reference to the local checkout
- dev: page 200, devknobs served from the local path, bezel images 200
- edit in the devknobs checkout reloads the site
Summary by cubic
The dev server runs devknobs from a local checkout so the site tests the panel in progress and edits there reload. Build, preview, CI, and prod keep the pinned npm package, now bumped to 0.1.0.
- The checkout comes from
DEVKNOBS_PATH(absolute, or relative to the repo root), else../devknobsbeside the repo; dev start logs which devknobs is in use, and bezel images map from the checkout'sassets/bezels. - The early script is injected ahead of React's head content so a reload with a device set keeps the frame; in dev the plugin rebuilds it from the checkout when its sources change.
- The page presents devknobs 0.1.0: the iPhone Duo (fold and unfold), mat colors, new default keys, and panel settings, with the try buttons split into device and knob groups.
- Font sizes and page line heights are now in rem so the text size knob scales the page text.