Skip to content

Instantly share code, notes, and snippets.

@gustavonecore
Created August 24, 2018 21:09
Show Gist options
  • Save gustavonecore/95a4a79ed768dc0059a5eb75970799ad to your computer and use it in GitHub Desktop.
Save gustavonecore/95a4a79ed768dc0059a5eb75970799ad to your computer and use it in GitHub Desktop.
Mac command alias for react native development
# Open your bash_profile and add these lines
alias react-native-reset-cache="react-native bundle --platform android --dev false --entry-file index.android.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res"
alias react-native-release-debug="cd android && ./gradlew assembleDebug && cd ..;"
alias react-native-build-debug-apk="rm -f android/app/build/outputs/apk/app-debug.apk; react-native-reset-cache;react-native-release-debug;"
# Then, run > source /Users/{username}/.bash_profile
# At this point, you are ready to go. If you want to build a debug release, just type:
react-native-build-debug-apk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment