Replace the pattern of reading shadow-cljs.edn, mutating it with pr-str (which destroyed formatting), and writing it back. Instead, use shadow-cljs's built-in `#shadow/env` reader tag to read the port from the SHADOW_HTTP_PORT environment variable at startup, with a default of 3001. Both `dev-replicant` and `dev-all` tasks now pass the port via env var instead of file mutation. This eliminates the dirty-file problem where the rewritten single-line config would show up as an unrelated change.
10 lines
277 B
Clojure
10 lines
277 B
Clojure
{:deps true
|
|
:dev-http {#shadow/env ["SHADOW_HTTP_PORT" :as :int :default 3001] "public"}
|
|
:builds
|
|
{:app
|
|
{:target :browser
|
|
:output-dir "public/js"
|
|
:asset-path "/js"
|
|
:modules {:main {:init-fn dev.replicant/init!}}
|
|
:devtools {:after-load dev.replicant/reload!}}}}
|