Skip to content

Commit 9ec65b3

Browse files
committed
add suggestions
1 parent 72b259f commit 9ec65b3

File tree

2 files changed

+22
-8
lines changed

2 files changed

+22
-8
lines changed

scripts/simulator.sh

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#!/bin/sh
22

33
if [[ $# = 0 ]]; then
4-
echo "Usage: $0 Scheme-Name Debug/Release"
5-
exit 1
4+
echo "Usage: $0 Scheme-Name Debug/Release"
5+
exit 1
66
fi
77

88
TS_FILE="./scripts/validate-env.ts"
@@ -25,9 +25,23 @@ if [ $EXIT_CODE -ne 0 ]; then
2525
exit 1
2626
fi
2727

28-
# check if expo is installed as devDependency
29-
if [ -d "./node_modules/expo" ]; then
30-
expo run:ios --scheme $1 --configuration $2 ${@:3}
31-
else
32-
react-native run-ios --scheme $1 --mode $2 ${@:3}
28+
if [ ! -d "./node_modules" ]; then
29+
echo "node_modules not found. Installing dependencies..."
30+
yarn install
3331
fi
32+
33+
if [[ $USE_RN_CLI = true ]]; then
34+
echo "Using react-native-cli"
35+
react-native run-ios --scheme $1 --mode $2 ${@:3}
36+
exit 0
37+
else
38+
# check if expo is in node_modules
39+
if [ ! -d "./node_modules/expo" ]; then
40+
echo "expo not found. Installing expo locally..."
41+
yarn add -D expo
42+
fi
43+
44+
echo "Using expo-cli"
45+
expo run:ios --scheme $1 --configuration $2 ${@:3}
46+
exit 0
47+
fi

yarn.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9300,7 +9300,7 @@ ts-interface-checker@^0.1.9:
93009300

93019301
ts-node@^10.9.1:
93029302
version "10.9.1"
9303-
resolved "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz"
9303+
resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.9.1.tgz#e73de9102958af9e1f0b168a6ff320e25adcff4b"
93049304
integrity sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==
93059305
dependencies:
93069306
"@cspotcode/source-map-support" "^0.8.0"

0 commit comments

Comments
 (0)