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:
Florian Schroedl
2026-03-05 14:43:29 +01:00
parent e003e1c4a8
commit 4f42dce649
2 changed files with 6 additions and 14 deletions

View File

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