fix: squint dev server running from wrong directory
The `bash -c 'cd dir && cmd1 & cmd2'` pattern splits into two command lists — cmd2 runs in the original cwd, not after the cd. Fix by repeating the cd after the `&` in the tmux pane command, and using `exec` in the standalone dev-squint task.
This commit is contained in:
4
bb.edn
4
bb.edn
@@ -86,7 +86,7 @@
|
|||||||
:depends [build-theme ensure-npm]
|
:depends [build-theme ensure-npm]
|
||||||
:task (let [port (or (some-> (System/getenv "PORT") parse-long) 3002)]
|
:task (let [port (or (some-> (System/getenv "PORT") parse-long) 3002)]
|
||||||
(shell {:dir "dev/squint"}
|
(shell {:dir "dev/squint"}
|
||||||
"bash" "-c" (str "npx squint watch & npx vite --port " port)))}
|
"bash" "-c" (str "npx squint watch & exec npx vite --port " port)))}
|
||||||
|
|
||||||
dev
|
dev
|
||||||
{:doc "Start all dev servers"
|
{:doc "Start all dev servers"
|
||||||
@@ -121,7 +121,7 @@
|
|||||||
(str "bash -c 'cd dev/replicant && npx shadow-cljs watch app'"))
|
(str "bash -c 'cd dev/replicant && npx shadow-cljs watch app'"))
|
||||||
(shell "tmux split-window -v -t" session
|
(shell "tmux split-window -v -t" session
|
||||||
(str "bash -c 'cd dev/squint && npx squint watch"
|
(str "bash -c 'cd dev/squint && npx squint watch"
|
||||||
" & npx vite --port " sport "'"))
|
" & cd dev/squint && npx vite --port " sport "'"))
|
||||||
(shell "tmux select-layout -t" session "tiled")
|
(shell "tmux select-layout -t" session "tiled")
|
||||||
(println (str "Tmux session 'ui-dev' created (base port " base "):"))
|
(println (str "Tmux session 'ui-dev' created (base port " base "):"))
|
||||||
(println (str " Pane 0: Hiccup → http://localhost:" hport))
|
(println (str " Pane 0: Hiccup → http://localhost:" hport))
|
||||||
|
|||||||
Reference in New Issue
Block a user