Skip to content

Scaffold core, CLI and UI with CI, Pages and auto-tagging - #9

Merged
XDGFX merged 3 commits into
mainfrom
worktree-1-scaffold
Oct 2, 2026
Merged

XDGFX merged 3 commits into
mainfrom
worktree-1-scaffold

Conversation

@XDGFX

@XDGFX XDGFX commented Oct 2, 2026 •

Copy link
Copy Markdown
Owner

Closes #1

What's here

  • Core (src/core/): runs in the browser and in Node. tsconfig.core.json gives it neither DOM nor Node types, so either one fails the typecheck. For now it only reads a file's format: kind/version line, and refuses unknown formats and versions newer than it knows.
  • CLI (src/cli/, the dunnage bin): check reads the format header of each file (the full schema comes with the format work), export is a stub that exits 1, and --version is there too.
  • UI (src/ui/): Vite + React + three.js. It draws the coffee fixture's drawer as a wireframe. three.js 0.186.1 and manifold-3d 3.5.4 are dependencies, and a Vitest smoke test builds a manifold-3d solid in Node.
  • Fixtures: coffee.drawer.yml and p1s.printer.yml, copied as-is from Hailey's docs/prototypes/drawer-tool-ui/.
  • AGENTS.md: any commit that changes behaviour bumps the version (on 0.x: minor for a feature, patch for a fix). CLAUDE.md points at it.
  • Bun is the package manager and runtime: there's a bun.lock, and Vitest runs on Bun through bun run test. The issue said npm; Cal chose Bun after the PR was opened. The built CLI still runs on Node.

CI (.github/workflows/ci.yml)

  • Every push and PR: typecheck, Vitest, build, then dunnage check over fixtures/.
  • Push to main: deploys dist-site/ to GitHub Pages. Pages is now enabled with GitHub Actions as its source.
  • Push to main with a version that has no tag: builds dist/, commits it on top of the main commit, and tags the result vX.Y.Z. It then installs github:XDGFX/dunnage#vX.Y.Z with npm and with Bun, and runs node_modules/.bin/dunnage. If either install fails, the tag is deleted. Merging this PR tags v0.1.0.

Release commits carry dist/ because Bun doesn't run a git dependency's prepare script. Even when the consuming project trusts the package, Bun links bins before that script runs. So a tag that builds on install gives Bun users no dunnage bin. With the build already in the tag, npm and Bun both install it without running anything. Only tags are installable: branches and main have no dist/.

Checked locally

  • bun run typecheck, bun run test (7 tests), bun run build and bun run validate all pass.
  • I pushed a release commit with dist/ to a throwaway branch (since deleted) and installed it with npm install and with bun add. In both, node_modules/.bin/dunnage --version prints 0.1.0 and check passes, with no install scripts to trust.
  • Not checked: how the UI looks in a browser (preview tools were off). The site build itself succeeds.

🤖 Generated with Claude Code

XDGFX and others added 3 commits October 2, 2026 10:51
A core that runs in the browser and Node, the `dunnage` bin on top of it
(`check` reads the format header; `export` is stubbed), and a Vite + React
+ three.js UI. CI builds, tests and checks the fixtures, deploys the UI to
Pages, and tags vX.Y.Z when main carries a new version.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Review fixes: the tag job now installs the commit from GitHub and runs the
bin before pushing vX.Y.Z, so a broken build never gets a tag. Pages deploys
no longer race, the core ships .d.ts files, and the CLI test resolves its
path with fileURLToPath.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Bun is now the package manager and runtime: bun.lock replaces
package-lock.json, CI uses setup-bun, and Vitest runs on Bun.

Bun doesn't run a git dependency's prepare script (and links bins before
it would), so installing a tag that builds on install left no dunnage
bin. CI now commits the built dist/ on top of the release commit and tags
that, then installs the tag with npm and Bun, deleting it if either
fails. prepare is gone; only tags are installable.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@XDGFX
XDGFX merged commit ae44c07 into main Oct 2, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Scaffold the repo: core, CLI and UI, with CI, Pages and auto-tagging

1 participant