diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2022-03-09 00:56:57 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2022-03-15 01:43:12 +0100 |
commit | 36f6e773eb4214c466de9f65d80b112fdb61563e (patch) | |
tree | 8f6ad10b62668752a019f6bc114a092bb4266409 /static/make-watch | |
parent | Add index entry for texinfo file. (diff) | |
download | calp-36f6e773eb4214c466de9f65d80b112fdb61563e.tar.gz calp-36f6e773eb4214c466de9f65d80b112fdb61563e.tar.xz |
Add alt make-watch for static in existing TMUX sessions.
Diffstat (limited to 'static/make-watch')
-rwxr-xr-x | static/make-watch | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/static/make-watch b/static/make-watch new file mode 100755 index 00000000..c985b37f --- /dev/null +++ b/static/make-watch @@ -0,0 +1,23 @@ +#!/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" + +# Note that 'tsc --watch' doesn't provide the files we are using. It's +# just here for debug. +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" \; \ + rename-session "calp watch" \; \ + select-layout even-vertical + + fi |