From 5c14098919cf7a37e1c0410bb2895c509e513a81 Mon Sep 17 00:00:00 2001 From: Chris Kehayias Date: Sun, 31 May 2026 11:36:45 -0400 Subject: [PATCH] docs(setup): lead Quick Setup with the zero-prereq node bootstrap MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A clean-machine evaluation noted the branded `pnpm setup` command can't be the true cold-start entry point because it presupposes pnpm is installed. The bootstrap (scripts/setup-bootstrap.mjs) needs only Node — already the first prerequisite — and enables pnpm via Corepack + installs deps itself. - Quick Setup now leads with `node scripts/setup-bootstrap.mjs`, which works on a machine with only Node and Git. - Keep `corepack enable && pnpm setup` documented as the equivalent path for those who already have pnpm. - Note that flags forward to either entry point. Co-Authored-By: Claude Opus 4.8 (1M context) --- README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index b022dcd..3a54533 100644 --- a/README.md +++ b/README.md @@ -101,15 +101,16 @@ Two layers, used by different surfaces: ### Quick Setup (Automated) -An interactive setup command walks you through the whole process. It bootstraps itself — if pnpm or `node_modules` are missing, it installs them first, so this works on a clean clone: +An interactive setup command walks you through the whole process. The bootstrap entry point needs **only Node** (already a prerequisite) — it enables pnpm via Corepack, installs dependencies, then launches setup, so this works on a clean machine with nothing but Node and Git: ```bash git clone https://github.com/MinistryPlatform-Community/MPNext-Widgets.git cd MPNext-Widgets -corepack enable # one-time: makes the pinned pnpm available -pnpm setup +node scripts/setup-bootstrap.mjs ``` +> **Already have pnpm?** `corepack enable && pnpm setup` (or just `pnpm setup`) runs the exact same flow. The `node` command above is the cold-start path because it doesn't presuppose pnpm is installed. + The interactive setup command will: 1. Verify Node.js version (v20.9+ required) 2. Check the git origin (offer to fork or re-init if it's still the template repo) @@ -121,7 +122,7 @@ The interactive setup command will: 8. Generate Ministry Platform types (a warning, not a failure, when committed types already exist) 9. Run a production build to verify configuration -**Additional setup options:** +**Additional setup options** (flags forward to either entry point — e.g. `node scripts/setup-bootstrap.mjs --clean`): ```bash pnpm setup:check # Validation only (no changes) pnpm setup -- --clean # Clean install (delete node_modules first)