React-native + web monorepo with graph ql api from AniList
- Run
yarn set version berry
at the root of project. It will create a.yarnrc.yml
file. - Add the following lines to
.yarnrc.yml
to ensurenode_modules
directories are all created in each workspace:
nodeLinker: node-modules
nmHoistingLimits: workspaces
nmHositingLimits
tells how to hoist dependencies for each workspace. By setting it toworkspaces
all dependencies will be installed in each workspace'snode_modules
rather than being hoisted to the root folder. This means you can now you can safely thenoHoist
section in the root'spackage.json
.
Check out Yarn 2+'s "getting started" guide for more info.
Development and build commands:
yarn android:metro
: Start the metro server for Android/iOSyarn android:start
: Start developing the Android appyarn android:studio
: Open the android app on Android Studioyarn ios:metro
: Start the metro server for Android/iOSyarn ios:start
: Start developing the iOS appyarn ios:pods
: Install iOS cocoapods dependenciesyarn ios:xcode
: Open the iOS app on XCodeyarn web:start
: Start developing the web appyarn web:build
: Create a production build of the web app