BizzPocket

Theme SDK: contributor setup

On this page

On a fresh checkout or git worktree, run one command from the repo root:

bun run theme:setup

It takes about 20 seconds with a warm Bun cache.

What it does

  1. Checks the Bun version against the one CI uses (1.3.14).
  2. Installs dependencies (bun install --frozen-lockfile, falling back to bun install).
  3. Resets the mode of packages/cli/src/bin.ts (Bun chmods it to 755 because it is the bizzpocket bin target; the repo tracks 644).
  4. Builds dist/ in dependency order: sir, theme, theme-runtime, theme-sdk, then eslint-plugin-theme-safety.
  5. Smoke check: bun test in packages/theme, then bizzpocket build --target both --json in packages/themes/toyshop (build output that git does not ignore is removed).

Each step prints one line with its duration. On failure it prints the failing command, the last lines of output and what to try, and exits non-zero. It is safe to re-run.

Flags

  • --skip-install reuse the existing node_modules; never touches bun.lock.

  • --keep-lockfile keep whatever bun install wrote to bun.lock.

  • --skip-smoke build only, skip the test and the toyshop build.

    bun run theme:setup -- --skip-install

Known caveat: frozen lockfile

bun install --frozen-lockfile currently fails on bun.lock (duplicate @types/bun / bun-types / typescript keys left by a merge, plus a stale @sentry/webpack-plugin peer entry). The script then falls back to a plain bun install, which rewrites bun.lock:

  • If bun.lock and every package.json were clean before, the rewrite is undone and one line says so. Never commit a bun.lock change from a feature branch.
  • If you had modified bun.lock or a package.json, the new lockfile is kept (dependencies changed) and one line says so; review it before committing.
  • --keep-lockfile always keeps what install wrote.