auto connect to first device by default
This commit is contained in:
parent
97faf3a9d8
commit
02d9ae9582
|
@ -408,7 +408,7 @@ getDeviceUuids = ->
|
||||||
getDeviceList().map (line) -> line.match(/\[(.+)\]/)[1]
|
getDeviceList().map (line) -> line.match(/\[(.+)\]/)[1]
|
||||||
|
|
||||||
|
|
||||||
startRepl = (name) ->
|
startRepl = (name, autoChoose) ->
|
||||||
log 'Starting REPL'
|
log 'Starting REPL'
|
||||||
hasRlwrap =
|
hasRlwrap =
|
||||||
try
|
try
|
||||||
|
@ -428,7 +428,7 @@ startRepl = (name) ->
|
||||||
"""
|
"""
|
||||||
(require '[cljs.repl :as repl])
|
(require '[cljs.repl :as repl])
|
||||||
(require '[ambly.core :as ambly])
|
(require '[ambly.core :as ambly])
|
||||||
(let [repl-env (ambly.core/repl-env)]
|
(let [repl-env (ambly.core/repl-env#{if autoChoose then ' :choose-first-discovered true' else ''})]
|
||||||
(cljs.repl/repl repl-env
|
(cljs.repl/repl repl-env
|
||||||
:watch \"src\"
|
:watch \"src\"
|
||||||
:watch-fn
|
:watch-fn
|
||||||
|
@ -478,8 +478,9 @@ cli.command 'launch'
|
||||||
|
|
||||||
cli.command 'repl'
|
cli.command 'repl'
|
||||||
.description 'launch a ClojureScript REPL with background compilation'
|
.description 'launch a ClojureScript REPL with background compilation'
|
||||||
.action ->
|
.option '-c, --choose', 'choose target device from list'
|
||||||
startRepl readConfig().name
|
.action (cmd) ->
|
||||||
|
startRepl readConfig().name, !cmd.choose
|
||||||
|
|
||||||
|
|
||||||
cli.command 'listdevices'
|
cli.command 'listdevices'
|
||||||
|
|
Loading…
Reference in New Issue