Last active
December 23, 2018 11:36
-
-
Save Bruno-Furtado/c9ca1a818f540442c45a77236d9ca5e6 to your computer and use it in GitHub Desktop.
Create and Run a New React Native Project
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Requirements: | |
# - MacOS 10.13.3 | |
# - Homebrew | |
# - Node/NPM | |
# - Watchman | |
# - React Native CLI | |
# - Atom (with linter, linter-eslint and linter-ui-default packages) | |
# 1 - create a new react native project | |
react-native init <project_name> --package <com.example.project_name> | |
# 2 - eslint setup (before that, be sure that your editor has the lint package installed) | |
npm install --save-dev eslint-config-rallycoding | |
# 3 - create a configuration file named .eslintrc and copy the follow content: | |
{ "extends": "rallycoding" } | |
# 4 - install all dependencies | |
npm install | |
# 5 - start the react native packager/server | |
react-native start | |
# 6 - have an android emulator running (be sure that the emulator is running) | |
react-native run-android | |
# 7 - have an iOS simulator running | |
react-native run-ios | |
# 8 - enable debug on android device | |
adb shell input keyevent 82 | |
# 9 - update android scripts | |
react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res | |
# 10 - generate android debug apk | |
cd android | |
./gradlew assembleDebug | |
./gradlew assembleRelease |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment