Skip to content

Instantly share code, notes, and snippets.

@snluu
Last active March 28, 2020 16:53
Show Gist options
  • Save snluu/a2897cc9c52c4028fa58ecdae0ea6341 to your computer and use it in GitHub Desktop.
Save snluu/a2897cc9c52c4028fa58ecdae0ea6341 to your computer and use it in GitHub Desktop.
Using fswatch to automatically rebuild changes
# Start the server:
cd lenote-server; fswatch src -vro | (while read; do clear; \
date; \
pkill lenote-server; \
sleep 2; \
(RUST_LOG="warn,lenote_server=info" cargo run -- --ui ../target/pkg/debug/ --pages ../pages --data ~/lenote-data &); \
done)
# On a different terminal, start file-watcher to compiler the UI on changes:
cd lenote-ui; fswatch src -vro | (while read; do clear; \
date; \
wasm-pack build --debug --no-typescript -d ../target/pkg/debug --out-name lenote_ui --target web; \
done)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment