From edb6362688c0a79b485236d86198edad7a3d26e1 Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Thu, 25 Jul 2019 14:33:02 +0100 Subject: [PATCH] Optimise client-watch by using rollup --watch --- build | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/build b/build index fe6c5d0..697f018 100755 --- a/build +++ b/build @@ -150,17 +150,17 @@ task_client() { task_client-watch() { set_title "Client Watcher"; + execute node_modules/rollup/bin/rollup --watch --sourcemap --config rollup.config.js & + echo -e "Watching for changes."; while :; do # : = infinite loop # Wait for an update # inotifywait's non-0 exit code forces an exit for some reason :-/ inotifywait -qr --event modify --format '%:e %f' client_src rollup.config.js; - # Rebuild the client code - spawn a sub-process to avoid the hard exit - # This still doesn't work though, which is *really* annoying - stage_begin "Rebuilding client code"; - ./build client; - stage_end $?; + task_begin "Copying html"; + execute cp client_src/index.html "app/"; + task_end $?; done }