parent
72550083f9
commit
2492ee7edd
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "SyngIm",
|
||||
"interface": "reagent",
|
||||
"androidHost": "localhost",
|
||||
"androidHost": "10.0.3.2",
|
||||
"modules": [
|
||||
"react-native-contacts",
|
||||
"react-native-invertible-scroll-view",
|
||||
|
@ -19,5 +19,9 @@
|
|||
"imageDirs": [
|
||||
"images"
|
||||
],
|
||||
"iosHost": "localhost"
|
||||
"iosHost": "localhost",
|
||||
"envRoots": {
|
||||
"dev": "env/dev",
|
||||
"prod": "env/prod"
|
||||
}
|
||||
}
|
|
@ -10,8 +10,8 @@
|
|||
(def root-el (r/as-element [reloader]))
|
||||
|
||||
(figwheel/watch-and-reload
|
||||
:websocket-url "ws://localhost:3449/figwheel-ws"
|
||||
:heads-up-display true
|
||||
:websocket-url "ws://10.0.3.2:3449/figwheel-ws"
|
||||
:heads-up-display false
|
||||
:jsload-callback #(swap! cnt inc))
|
||||
|
||||
(core/init)
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
(figwheel/watch-and-reload
|
||||
:websocket-url "ws://localhost:3449/figwheel-ws"
|
||||
:heads-up-display true
|
||||
:heads-up-display false
|
||||
:jsload-callback #(swap! cnt inc))
|
||||
|
||||
(core/init)
|
|
@ -0,0 +1,52 @@
|
|||
#!/bin/sh
|
||||
|
||||
[ `uname -s` != "Darwin" ] && return
|
||||
|
||||
function tab () {
|
||||
local cmd=""
|
||||
local cdto="$PWD"
|
||||
local args="$@"
|
||||
|
||||
if [ -d "$1" ]; then
|
||||
cdto=`cd "$1"; pwd`
|
||||
args="${@:2}"
|
||||
fi
|
||||
|
||||
if [ -n "$args" ]; then
|
||||
cmd="; $args"
|
||||
fi
|
||||
|
||||
osascript &>/dev/null <<EOF
|
||||
tell application "iTerm"
|
||||
tell current terminal
|
||||
launch session "Default Session"
|
||||
tell the last session
|
||||
write text "cd \"$cdto\"$cmd"
|
||||
end tell
|
||||
end tell
|
||||
end tell
|
||||
EOF
|
||||
}
|
||||
|
||||
# Find Device based on Android version 6.0.0
|
||||
device=$(/Applications/Genymotion\ Shell.app/Contents/MacOS/genyshell -c "devices list" | grep "6.0.0")
|
||||
|
||||
echo ${device##*| }
|
||||
# Launch device in Genymotion
|
||||
open -a /Applications/Genymotion.app/Contents/MacOS/player.app --args --vm-name "${device##*| }"
|
||||
|
||||
# Install deps, prepare for genymotion and figwheel
|
||||
re-natal deps && re-natal use-android-device genymotion && re-natal use-figwheel
|
||||
|
||||
# open figwheel in new tab
|
||||
tab "lein figwheel android"
|
||||
|
||||
# open react-native package in new tab
|
||||
tab "react-native start"
|
||||
|
||||
# echo "Press any key when emulator, figwheel and packager are ready" && read -n 1
|
||||
sleep 10s
|
||||
|
||||
adb reverse tcp:8081 tcp:8081 && adb reverse tcp:3449 tcp:3449
|
||||
|
||||
react-native run-android
|
Loading…
Reference in New Issue