Closed geraldodev closed 6 years ago
This stuff is a bit out of scope for shadow-cljs itself.
You can however do this quite simply with standard bash stuff. The server process will write a .shadow-cljs/server.pid
file when its ready to be used. so you could write a wait-for-server.sh
that just waits for that file and then wait-for-server.sh && shadow-cljs watch cards
.
What you can also do is use clj-run
.
(ns demo.runnable
(:require
[shadow.cljs.devtools.api :as shadow]))
(defn start
{:shadow/requires-server true}
[& args]
(shadow/watch :cards)
(shadow/repl :cards))
npx shadow-cljs clj-run demo.runnable/start
That is if you don't need 3 separate tmux terminals and just put them all into one.
shadow-cljs server is the ice on the cake.
I have a tmux configuration that invokes 3 shadow-cljs
shadow-cljs cljs-repl cards
shadow-cljs watch cards
I'm commenting the processes that depend on the server process. It would be nice if these processes waited for the server process to be established and connect once it's live.