Last active
November 28, 2020 06:13
-
-
Save rahsheen/4a540080fe0056954d770f28afff75c8 to your computer and use it in GitHub Desktop.
NPM Script modifications for running React Native projects in WSL2.
This file contains hidden or 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
"scripts": { | |
"android": "react-native run-android", | |
"ios": "react-native run-ios", | |
"start": "react-native start --host 127.0.0.1", | |
"test": "jest", | |
"lint": "eslint . --ext .js,.jsx,.ts,.tsx", | |
"stop-winadb": "/mnt/c/Users/YOURNAME/AppData/Local/Android/Sdk/platform-tools/adb.exe kill-server", | |
"start-winadb": "/mnt/c/Users/YOURNAME/AppData/Local/Android/Sdk/platform-tools/adb.exe -a nodaemon server start", | |
"winadb": "yarn stop-winadb && yarn start-winadb", | |
"socat": "socat -d -d TCP-LISTEN:5037,reuseaddr,fork TCP:$(ip route|grep default|cut -d ' ' -f3):5037", | |
"emulator": "/mnt/c/Users/YOURNAME/AppData/Local/Android/Sdk/emulator/emulator.exe @Pixel_3_API_28" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Gist based on info from here and other places.
Normal usage would be something like:
There's likely a fancy scripty way to run all of these commands in order, but I didn't have the time to figure that out. I just run them all in separate terminal tabs.