Maintainers
Regenerating spinners from expo-agent-spinners
- Clone expo-agent-spinners into
.expo-spinners-src/at the repo root (gitignored). - Run:
node scripts/generate-agent-spinners.mjs- Run format, tests, and
npm run build.
Preview GIF and frame snapshot
Vanilla preview HTML and the npm readme GIF are driven by the same frame lists as the React components.
- Snapshot JSON + overview HTML (after editing
src/spinners/*.tsx):
npm run media:snapshotThis updates media/spinner-frames-snapshot.json and inlines data into media/overview.html.
- Animated GIF (Playwright + ffmpeg):
npm run media:gifRequires a Chromium install (npx playwright install chromium or system Chrome/Edge). Tunables live in scripts/capture-overview-gif.mjs (viewport, frame interval, fps).
- Mixed-frame X showcase GIF (four
createMixedFrameSpinnerdemos):npm run media:gif:mixed-xaftercd examples/mixed-x-gif-app && npm install. Output:media/next-spinners-mixed-x-showcase.gif. Tunables:scripts/capture-mixed-x-showcase-gif.mjs(MIXED_X_GIF_*,MIXED_X_SHOWCASE_BASE_URL).
Prettier may flag regenerated media/overview.html / media/spinner-frames-snapshot.json; run the repo’s Prettier check/fix if CI complains.
Documentation site
From the repo root:
npm run docs:dev # Next.js + Nextra (content in docs/content)
npm run docs:build # static export → docs/outdocs/sync-public.mjs runs before dev/build and copies media/ and examples/ into docs/public/ so images and static example paths resolve.
GitHub Pages: set DOCS_BASE=/next-spinner-kit when building (see CI). Local dev omits DOCS_BASE so the site is served from /.
Dev defaults: port 3320 (PORT or -p in npm run dev -- -p 3320), host 0.0.0.0 when using next dev --hostname 0.0.0.0.