packing everything in a script and add the relevant command in package.json package.json:
... "scripts": { "android:offline": "./build_debug_offline.sh", } ...
create the file in the root folder build_debug_offline.sh, add +x permission to it
build_debug_offline.sh:
#!/bin/bash set -x npm start & 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 curl "http://localhost:8081/index.bundle?platform=android" -o "android/app/src/main/assets/index.android.bundle" cd android && ./gradlew clean assembleDebug set +x
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
packing everything in a script and add the relevant command in package.json
package.json:
create the file in the root folder build_debug_offline.sh, add +x permission to it
build_debug_offline.sh: