auto connect to first device by default

This commit is contained in:
Dan Motzenbecker 2015-11-14 18:39:15 -05:00
parent 97faf3a9d8
commit 02d9ae9582
1 changed files with 5 additions and 4 deletions

View File

@ -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'