hermes-node now builds and publishes the prebuilt Hermes and embed library itself (utils/build-apple-prebuilt.sh, released as prebuilt-<commit> by its own CI), since they depend only on its commit. Drop Orbit's build script and publishing workflow; hermes-prebuilt.sh downloads the release for the pinned HERMES_NODE_REF. Bump hermes-node to f156186.
3.4 KiB
Contributing to Expo Orbit
📦 Download and Setup
- Fork this repository to your own GitHub account and then clone it to your local device. (
git remote add upstream [email protected]:expo/orbit.git😉). - Make sure you have the following packages globally installed on your system:
- Install the Node packages (
yarn install). - Install the Ruby packages (
bundle install) inside theapps/menu-bardirectory. - Install the Pods (
npx pod-install) inside theapps/menu-bardirectory. - Build
common-types,eas-sharedandcliby runningyarn buildat the root of the project. - Inside the
apps/clidirectory runyarn archiveto generate the standalone executable used by themenu-bar. - Finally, run
yarn update-cliinside theapps/menu-bardirectory to update the local CLI file.
Experimental: the CLI on Hermes (ORBIT_HERMES_CLI)
By default the macOS app bundles the CLI as pkg-built Node binaries. Running pod install with ORBIT_HERMES_CLI=1 (or setting "hermesCli": "true" in apps/menu-bar/macos/Podfile.properties.json) opts into running it on the app's own Hermes through hermes-node instead. The Xcode "Build CLI" phase then builds apps/cli to Hermes bytecode plus a small orbit-cli launcher (apps/cli/hermes-launcher/) in every configuration.
Hermes and hermes-node are downloaded prebuilt for the hermes-node commit pinned in apps/menu-bar/macos/scripts/hermes-node.sh, from that commit's release in hermes-node, where hermes-node's CI publishes them. If that commit has no release yet, they're built from source instead, which needs cmake and ninja and takes ~10–15 min the first time. Set HERMES_NODE_DIR to work against a local hermes-node checkout. Running pod install without the flag goes back to the default.
🏎️ Start the Development Environment
- From the
apps/menu-bardirectory, runyarn startto start Metro Bundler. - Run
yarn macosand build themenu-barapp with Xcode. - Orbit should automatically show up in your menu bar.
📝 Writing a Commit Message
Note
If this is your first time committing to a large public repo, you could look through this neat tutorial: "How to Write a Git Commit Message"
Commit messages are formatted like so: [menu-bar] Title. Examples:
[cli] Fix typo in xxx
[devices-manager] Add test-case for custom devices
[menu-bar] Update loading icon
🔎 Before Submitting a PR
To help keep CI green, please make sure of the following:
- Run
yarn lint --fixto fix the formatting of the code. Ensure thatyarn lintsucceeds without errors or warnings.
📚 Additional Resources
Hungry for more? Check out these great guides: