Build server will be listening at localhost:9630. Nrepl server will be listening at localhost:3333.
Shadow target watcher
`shadow-cljs watch [:app|:free|:pro|:dev-free|:dev-pro]`
Differences between each include:
- Load devtools
- Config vars for feature availability checks
- Initialization function
react-native metro bundler
`npx react-native start`
Starts the server that communicates with connected device[s?]. I think it looks for `index.js` in the directory from which it’s run. In our case, we have an `index.js` that simply imports from `app/index.js` which is where Shadow-cljs is outputting our compiled ClojureScript.
Delivery to Android emulator
`npx react-native run-android –flavor [pro|free] –variant [debug|release]`
Must use modified version of CLI that gives ability to pass a “flavor” flag. Or, run the gradle commands manually. See `@react-native-community/cli-platform-android`.
Android builds have a concept of “flavor” that I’m taking advantage of to have free/pro versions. The React CLI doesn’t (didn’t?) have a way to pass those in. So look to https://github.com/eihli/cli for the fork.
Custom ReactNative CLI
- Clone from eihli/cli
- `yarn watch`
- `yarn link-packages` in /cli
- `yarn link @react-native-community/cli-platform-android` in /ezmonic-mobile/react-native
When done hacking/editing:
- `yarn unlink @react-native-community/cli-platform-android`
- `yarn install –force @react-native-community/cli-platform-android`