From e9018b84c0fa50ccdd8e8d23280813a0f2d591b0 Mon Sep 17 00:00:00 2001 From: Alex Janka Date: Mon, 8 Jan 2024 09:17:17 +1100 Subject: [PATCH] live reload server --- .gitignore | 1 + watch.sh | 6 ++++++ 2 files changed, 7 insertions(+) create mode 100755 watch.sh diff --git a/.gitignore b/.gitignore index 3cc8315..8a86b2f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /target /test-config +.trigger diff --git a/watch.sh b/watch.sh new file mode 100755 index 0000000..8dcc863 --- /dev/null +++ b/watch.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash +( + trap 'kill 0' SIGINT + cargo watch -x check -s 'touch .trigger' & + cargo watch --no-vcs-ignores -w .trigger -x "run -- --config-dir test-config watch" +)