diff --git a/docs/docs/showcases.md b/docs/docs/showcases.md index fefc3325cc0..a0ed6d34049 100644 --- a/docs/docs/showcases.md +++ b/docs/docs/showcases.md @@ -23,8 +23,15 @@ The playground example is a place where we showcase and test all features of rea git clone https://github.com/wix/react-native-navigation cd react-native-navigation npm install + +# for iOS: npm run xcode # Opens XCode -npm start # Starts the packager +npm start # Starts the packager on linux like systems + +# for Android: +# 1. open Android Studio inside ".\playground" +# 2. start a emulator +npm run start-windows # Start the packager if you are on a windows system -# Run the app in Simulator or on Device from within XCode +# Run the app in Simulator or on Device from within XCode/Android Studio ``` diff --git a/package.json b/package.json index 2930255e02a..3afb9cbce61 100644 --- a/package.json +++ b/package.json @@ -27,6 +27,7 @@ "clean": "node ./scripts/clean", "prestart": "npm run build", "start": "node ./scripts/start", + "start-windows": "node ./scripts/start-windows", "pretest-js": "npm run build", "test-js": "node ./scripts/test-js", "test-unit-ios": "node ./scripts/test-unit --ios", diff --git a/scripts/start-windows.js b/scripts/start-windows.js new file mode 100644 index 00000000000..3f15f3fd86c --- /dev/null +++ b/scripts/start-windows.js @@ -0,0 +1,11 @@ +const exec = require('shell-utils').exec; + +run(); + +function run() { + // exec.killPort(8081); + // exec.execSync(`rd "./lib/dist" /Q/S`); + exec.execSync(`"./node_modules/.bin/tsc"`); + exec.execSync(`adb reverse tcp:8081 tcp:8081`); + exec.execSync(`node ./node_modules/react-native/local-cli/cli.js start`); +}