在 javascriptnodemon中是一个静态文件服务器,它在代码更改时重新加载。我正在使用wasm-pack并miniserve执行两个命令:
build
wasm-pack build --target web --out-name wasm --out-dir ./static/build
serve:
miniserve ./static --index index.html
我希望这两个能够像在 javascript 中一样自动化nodemon。
使用cargo-watch并通过 shell 命令执行 using -sor --shell flags:
cargo watch -s 'wasm-pack build --target web --out-name wasm --out-dir ./static/build && miniserve ./static --index index.html'