Skip to content

Commit

Permalink
Implement better watch script (#899)
Browse files Browse the repository at this point in the history
The python build step for the site can take a while, but sometimes you
just want to restart the rspack watcher

So, press ^C once and wait 1 second to just restart the watcher, press
^C again once the watcher shuts down to stop watching entirely.
  • Loading branch information
lukebrody authored Feb 1, 2025
1 parent 94b8662 commit afa31fc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion react/watch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,9 @@ set -e
cd ..
python create_website.py $1 --mode=dev --no-data --no-geo --no-juxta
cd react
rspack serve --mode=development --watch --env directory=$1

while true; do
rspack serve --mode=development --watch --env directory=$1
echo 'Restarting watcher... Press ^C again to stop watching.'
sleep 1
done

0 comments on commit afa31fc

Please sign in to comment.