All development tasks in Infinite Mac are driven throughDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/mihaip/infinite-mac/llms.txt
Use this file to discover all available pages before exploring further.
npm run. The scripts are defined in package.json and delegate to shell scripts under scripts/ or to Python programs invoked via uv run. The sections below group every script by purpose.
Development Server
start
scripts/start-dev.sh. The app is served at http://localhost:3127 with Cross-Origin-Opener-Policy: same-origin and Cross-Origin-Embedder-Policy: require-corp headers set automatically so that SharedArrayBuffer works without additional configuration.
preview
build/ directory using Vite’s preview server. Runs at https://localhost:4127 (TLS is provided by @vitejs/plugin-basic-ssl). Requires a prior npm run build.
worker-dev
wrangler dev --port=3128. The result is accessible at http://localhost:3128. Requires a separate npm run build invocation before running, since wrangler serves the pre-built assets from build/.
Building
build-tools
scripts/build-tools.sh to compile the native helper programs that the disk and library import scripts depend on. Run this once after npm install before using any of the import-* scripts.
build
vite build and outputs the compiled app into the build/ directory. The same output is used for local preview (preview) and Cloudflare Worker deployment (worker-deploy). The worker-deploy script sets CLOUDFLARE_ENV=production before invoking Vite to enable the production-only R2 bucket bindings and CDN cache configuration defined in wrangler.jsonc.
Importing Data
import-disks [minimal]
Library/ directory.
minimal— builds System 1 through System 7.5.5 only and skips populating Infinite HD, providing a fast path for development
This script calls the native macOS Mini vMac and Basilisk II binaries as a final step to validate the desktop database on the generated disk. If they are not installed, a warning is logged and the disk may take longer to mount in the emulator.
import-cd-roms [placeholder] [--sync-media]
placeholder— creates an empty CD-ROM library stub so the app runs without errors during development--sync-media— syncs self-hosted media files to the Cloudflare R2 bucket; this is separate from the disk image sync performed bysync-disks
import-library [placeholder]
macintoshgarden.org and other sites; the library contains only metadata.
placeholder— generates a minimal library that does not require a local Macintosh Garden data dump, suitable for development
import-emulator <emulator>
src/emulator/worker/emscripten/. Only necessary when modifying an emulator core and rebuilding it from source. The following emulator targets are supported:
| Target | Source |
|---|---|
basiliskii | macemu/BasiliskII/src/Unix |
sheepshaver | macemu/SheepShaver/src/Unix |
minivmac-Plus | minivmac/ |
minivmac-128K | minivmac/ |
minivmac-512Ke | minivmac/ |
minivmac-SE | minivmac/ |
minivmac-II | minivmac/ |
minivmac-IIx | minivmac/ |
dingusppc | dingusppc/build/bin |
previous | previous/build/src |
pearpc | pearpc/src |
snow | snow/target/wasm32-unknown-emscripten/release |
Deployment
worker-deploy
scripts/worker-deploy.sh, which performs a TypeScript check (tsc --noEmit) on both the app and worker tsconfigs, then runs vite build with CLOUDFLARE_ENV=production, and finally calls wrangler deploy to push the Worker to Cloudflare.
sync-disks
scripts/sync-disks.sh, which uses rclone to sync the chunked disk images from Images/build to the infinite-mac-disk Cloudflare R2 bucket. Requires rclone to be installed and configured via scripts/rclone.conf.
Code Quality
prettier
src/ and worker/ with Prettier using the project configuration in package.json (4-space indentation, ES5 trailing commas, double quotes, no bracket spacing).
lint
--fix over src/ and worker/. The ESLint config enforces TypeScript-aware rules via @typescript-eslint and React Hooks lint rules.
check
tsconfig.json) and one for the Cloudflare Worker (worker/tsconfig.json) — with --noEmit so no output files are written. Both must pass for the check to succeed.
format-macemu
clang-format -i over all files matching macemu/BasiliskII/src/Unix/JS/*, formatting the Basilisk II JavaScript glue files to the project’s C/C++ style.
Utilities
load-placeholder-stickies-file
scripts/load-placeholder-stickies-file.py via uv run. Injects a placeholder Stickies file into the generated disk image so that the Stickies application opens with sample notes. Used during development to verify that the Stickies injection pipeline works correctly.
generate-local-ca-bundle
scripts/generate-local-ca-bundle.mjs via Node. Generates a local CA certificate bundle used to support HTTPS in the development server (npm run start). Only needed when working on features that require a trusted TLS certificate locally.