make sure device exists on launch, change to default otherwise

This commit is contained in:
Dan Motzenbecker 2015-11-14 18:20:09 -05:00
parent 0a2cea3719
commit 04bfb40ee4
1 changed files with 8 additions and 0 deletions

View File

@ -348,6 +348,10 @@ init = (projName, interfaceName) ->
launch = ({name, device}) ->
unless device in getDeviceUuids()
log 'Device ID not available, defaulting to iPhone 6s simulator', 'yellow'
{device} = generateConfig name
log 'Compiling ClojureScript'
exec 'lein cljsbuild once dev'
@ -394,6 +398,10 @@ getDeviceList = ->
logErr 'Device listing failed: ' + message
getDeviceUuids = ->
getDeviceList().map (line) -> line.match(/\[(.+)\]/)[1]
startRepl = (name) ->
log 'Starting REPL'
hasRlwrap =