File tree 2 files changed +14
-4
lines changed
2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -125,6 +125,8 @@ configure launchpad.
125
125
:launchpad/shadow-build-ids [] ; which shadow builds to start, although it may
126
126
; be preferable to configure this as part of
127
127
; specific aliases in your main deps.edn
128
+ ; ; which shadow builds to automatically connect to if `--emacs` flag is provided
129
+ :launchpad/shadow-connect-ids []
128
130
}
129
131
```
130
132
Original file line number Diff line number Diff line change 320
320
(let [build-ids (->> aliases
321
321
(mapcat #(get-in deps-edn [:aliases % :launchpad/shadow-build-ids ]))
322
322
(concat (:launchpad/shadow-build-ids deps-edn))
323
- distinct)]
323
+ distinct)
324
+ connect-ids (->> aliases
325
+ (mapcat #(get-in deps-edn [:aliases % :launchpad/shadow-connect-ids ]))
326
+ (concat (:launchpad/shadow-connect-ids deps-edn))
327
+ distinct)
328
+ connect-ids (if (empty? connect-ids)
329
+ build-ids
330
+ connect-ids)]
324
331
; ; FIXME filter this down to builds that exist in the combined shadow config
325
332
(when (seq build-ids)
326
333
(debug " Starting shadow-cljs builds" build-ids))
327
334
(if (seq build-ids)
328
335
(-> ctx
329
336
(update :middleware (fnil conj []) 'shadow.cljs.devtools.server.nrepl/middleware)
330
337
(assoc :shadow-cljs/build-ids build-ids)
338
+ (assoc :shadow-cljs/connect-ids connect-ids)
331
339
(update :eval-forms (fnil conj [])
332
340
'(require 'lambdaisland.launchpad.shadow)
333
341
`(apply
361
369
:port ~nrepl-port
362
370
:project-dir ~project-root))))
363
371
364
- ~@(for [build -id (:shadow-cljs/build -ids ctx)
365
- :let [init-sym (symbol " launchpad" (name build -id))]]
372
+ ~@(for [connect -id (:shadow-cljs/connect -ids ctx)
373
+ :let [init-sym (symbol " launchpad" (name connect -id))]]
366
374
`(~'progn
367
375
(~'setf (~'alist-get '~init-sym
368
376
~'cider-cljs-repl-types)
369
377
(~'list ~(pr-str
370
- `(shadow.cljs.devtools.api/nrepl-select ~build -id))))
378
+ `(shadow.cljs.devtools.api/nrepl-select ~connect -id))))
371
379
(~'cider-connect-sibling-cljs (~'list
372
380
:cljs-repl-type '~init-sym
373
381
:host " localhost"
You can’t perform that action at this time.
0 commit comments