refactor: use #shadow/env for replicant dev-http port instead of rewriting config
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.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
{:deps true
|
||||
:dev-http {3001 "public"}
|
||||
:dev-http {#shadow/env ["SHADOW_HTTP_PORT" :as :int :default 3001] "public"}
|
||||
:builds
|
||||
{:app
|
||||
{:target :browser
|
||||
|
||||
Reference in New Issue
Block a user