Setup
Clone the repository, run the docs and a demo app, and run the checks.
Prerequisites
- Git
- Bun, the package manager of the monorepo (
bun.lockis committed) - Node.js
>=22.12.0, required by the Astro site - For the demo apps: Android Studio (Android SDK and JDK) for Android, Xcode on macOS for iOS
Install
git clone git@github.com:Online13/axiom.git
cd axiom
bun installThe repository installs dependencies hoisted (bunfig.toml). In isolated mode Bun put several copies of expo in the demos, which Expo doesn’t support. The consequence is one React version for the whole repository, the one Expo pins.
Run the documentation
bun web dev # http://localhost:4321
bun web build # check that every page compilesRun a demo app
The demos are development builds, not Expo Go: Unistyles ships native code Expo Go doesn’t have. Build once, then JavaScript changes reload through Metro.
cd apps/demo-stylesheet
bun android # build and install on a phone over USB (first time)
bun ios # or on iOS, from macOS with Xcode
bun run axiom:watch # copy registry files again on every change
bun start # Metro, with the QR codeThe same goes for demo-unistyles, demo-nativewind and demo-uniwind. Each has its own app id (dev.axiom.demo.<styling>), so the four install side by side.
Build again only after adding a library with native code, changing app.json or upgrading the Expo SDK.
No Mac for iOS
Without macOS, bun run sim:ios up --app <styling> builds a demo on a GitHub
macOS runner and streams an iOS Simulator to your browser. It needs gh
authenticated and your commit pushed. See
apps/NATIVE_SIM.md.
Edit the registry, not the demo
src/theme, src/hooks and src/components in a demo are written by the
CLI and ignored by git. A change made there is lost at the next copy. Edit
the file in packages/registry, and axiom:watch copies it over.
Run the checks
These are the same commands CI runs on a pull request.
| What changed | Command |
|---|---|
packages/registry | bun run --cwd packages/registry typecheck |
bun run --cwd packages/registry parity | |
packages/cli | bun run --cwd packages/cli typecheck |
bun run --cwd packages/cli test | |
| A demo app | bunx tsc --noEmit and bunx expo-doctor in its folder |
| A component | bun demo:stylesheet test |
apps/web | bun web build |
| Anything | bun run lint |
Rendering and gestures can’t be checked by a command: try your change on a real phone, on iOS and Android when you can. Testing explains what each check covers.