make sure device exists on launch, change to default otherwise
This commit is contained in:
parent
0a2cea3719
commit
04bfb40ee4
|
@ -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 =
|
||||
|
|
Loading…
Reference in New Issue