aboutsummaryrefslogtreecommitdiff
path: root/static/make-watch
blob: b328038a191356682746198f3085699e14b77ccc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash

here=$(dirname "$(realpath "$0")")
cd "$here" || {
	echo "Failed to cd to location of script ($here)"
	exit 1
}

export PATH="$here/node_modules/.bin:$PATH"

if [ -n "$TMUX" ]; then
	tmux new-window "scss --watch -I. style.scss:style.css"
	tmux new-window "tsc --watch"
else
	tmux \
		 new-session "scss --watch -I. style.scss:style.css" \; \
		 split-window "tsc --watch --noEmit" \; \
		 split-window "make watch-esbuild" \; \
		 rename-session "calp watch" \; \
		 select-layout even-vertical

 fi