Use node version 8.10.0 (the project supports nvm).
Use yarn to manage dependencies.
Install git-lfs brew install git-lfs
(used to version larger game assets).
Install Android Studio if required.
Install react-native dependencies:
brew install watchman
yarn global add react-native-cli
Add a .env
file to root of the project by copying .env.sample
and customising as required.
Install project dependencies, link native libs and build the game bundle:
yarn install
react-native link
react-native link react-native-randombytes
yarn game
yarn ios
yarn ipad
yarn iphoneX
yarn iphoneSE
yarn iphone8
Open an Android simulator (or connect a physical device) before running. Configure and launch simulators from Android Studio > Tools > AVD Manager.
yarn android
yarn desktop
Storybook configuration and stories are in the /storybook
directory. Add any new stories to /storybook/stories/
and require them in the loadStories
function in /storybook/index.js
.
Start storybook and then start a simulator (or physical device). Stories will run on the device, with the menu of stories loading in a browser window.
yarn storybook
yarn ios
yarn lint
yarn test
yarn content
yarn game