mirror of
https://github.com/penpot/penpot.git
synced 2025-05-10 08:56:37 +02:00
✨ Use babashka to properly wait exporter compilation.
This commit is contained in:
parent
3ddc95d4b5
commit
88a3548d7e
2 changed files with 5 additions and 14 deletions
|
@ -26,7 +26,9 @@ tmux send-keys -t penpot 'npx shadow-cljs watch main' enter
|
||||||
tmux new-window -t penpot:2 -n 'exporter'
|
tmux new-window -t penpot:2 -n 'exporter'
|
||||||
tmux select-window -t penpot:2
|
tmux select-window -t penpot:2
|
||||||
tmux send-keys -t penpot 'cd penpot/exporter' enter C-l
|
tmux send-keys -t penpot 'cd penpot/exporter' enter C-l
|
||||||
|
tmux send-keys -t penpot 'rm -f target/app.js*' enter C-l
|
||||||
tmux send-keys -t penpot 'npx shadow-cljs watch main' enter
|
tmux send-keys -t penpot 'npx shadow-cljs watch main' enter
|
||||||
|
|
||||||
tmux split-window -v
|
tmux split-window -v
|
||||||
tmux send-keys -t penpot 'cd penpot/exporter' enter C-l
|
tmux send-keys -t penpot 'cd penpot/exporter' enter C-l
|
||||||
tmux send-keys -t penpot './scripts/wait-and-start.sh' enter
|
tmux send-keys -t penpot './scripts/wait-and-start.sh' enter
|
||||||
|
|
|
@ -1,16 +1,5 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
set -e
|
bb -i '(babashka.wait/wait-for-port "localhost" 9630)';
|
||||||
|
bb -i '(babashka.wait/wait-for-path "target/app.js")';
|
||||||
wait_file() {
|
node target/app.js
|
||||||
local file="$1"; shift
|
|
||||||
local wait_seconds="${1:-10}"; shift # 10 seconds as default timeout
|
|
||||||
|
|
||||||
until test $((wait_seconds--)) -eq 0 -o -f "$file" ; do sleep 1; done
|
|
||||||
|
|
||||||
((++wait_seconds))
|
|
||||||
}
|
|
||||||
|
|
||||||
wait_file "target/app.js" 120 && {
|
|
||||||
node target/app.js
|
|
||||||
}
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue