Skip to content

Commit

Permalink
Playground for windows (#5644)
Browse files Browse the repository at this point in the history
Add script to start the packager on Windows
  • Loading branch information
DamarXCV authored and guyca committed Nov 13, 2019
1 parent 39ee170 commit 764863f
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
11 changes: 9 additions & 2 deletions docs/docs/showcases.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
11 changes: 11 additions & 0 deletions scripts/start-windows.js
Original file line number Diff line number Diff line change
@@ -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`);
}

0 comments on commit 764863f

Please sign in to comment.