First install homebrew, ruby, and Xcode.
bundle exec setup will setup iOS, Android and React Native environments.
If you only need a specific environment, setup android, setup ios, and setup react-native can be used individually.
bundle exec clean tries to wipe the collection of caches in the react-native dev environment by:
- Reset
watchman - Remove anything prefixed with
react-in the temp directory - Remove
~/.babel.json - Remove
~/.rncache - Remove both ios and android build directories
- Remove the
node_modulesdirectory - Clean the
npmcache - Run
npm install, start the packager with the--reset-cacheflag, and manually hit the packager url once it's running.
bundle exec start-dev is an attempt to simplify the multiple commands needed to start the app. It takes a platform and a virtual device name if android is specified:
start-dev iosstart-dev android Nexus5
It executes the following:
- Fire up storybook first, with spawn to avoid it stealing your terminal
- Briefly sleep so it's ready in time to attach itself to the socket before the packager is kicked off by the native app building
- Start an emulator if one was specified
- Run
react-native run-[platform] - Open the storybook url in a browser