From 079c02cd4ebce636c55d12f3decc29c7e9c61f98 Mon Sep 17 00:00:00 2001 From: Justin Giancola Date: Fri, 12 Jun 2026 13:29:26 -0400 Subject: [PATCH] fix(build): build the viewer on npm install so a fresh clone can serve MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The README quick start (npm install && npx sideshow serve --open) failed from a git clone with `viewer build missing — run npm run build:viewer first`: nothing in the install path built viewer/dist. Only the from- clone path was broken — the published package ships a built viewer via prepack. Chain `npm run build:viewer` onto the existing prepare script. prepare runs on npm install/ci in the repo root only, so registry consumers are untouched, and vite is a devDependency so it is always present when prepare runs. The viewer is already the codebase's one sanctioned build step; this just runs it where the quick start expects it. --- CHANGELOG.md | 4 ++++ package.json | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 32daadb..b90b8ae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -58,6 +58,10 @@ All notable user-visible changes to this project are documented in this file. shown on focus, the editable session title is labeled and Escape cancels an edit, snippet iframes carry the snippet title, and toasts are announced via a polite live region. +- Following the README quick start from a git clone failed: `npx sideshow +serve` exited with `viewer build missing` because nothing built the viewer. + `npm install` in the repo now builds it (the published npm package was + unaffected — `prepack` already ships a built viewer). ## [0.2.0] - 2026-06-11 diff --git a/package.json b/package.json index 48c5bd9..0d63a52 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "deploy": "npm run build:viewer && wrangler deploy", "dev:cloud": "npm run build:viewer && wrangler dev", "prepack": "npm run build", - "prepare": "simple-git-hooks" + "prepare": "simple-git-hooks && npm run build:viewer" }, "dependencies": { "@hono/node-server": "^1.14.0",