rustwasm / wasm-pack

📦✨ your favorite rust -> wasm workflow tool!
https://rustwasm.github.io/wasm-pack/
Apache License 2.0
6.23k stars 407 forks source link

watch command #457

Open netgusto opened 5 years ago

netgusto commented 5 years ago

💡 Feature description

It seems that a "watch source" is missing for the build subcommand.

Workaround

First, install fswatch on your system; then, at the root of your project :

fswatch -o -r ./src|xargs -I {} wasm-pack build --debug
ashleygwilliams commented 5 years ago

i think this sounds great! once i get 0.6.0 out the door we can schedule this for the next release

hobofan commented 5 years ago

Here is another solution using cargo-watch:

cargo watch -i .gitignore -i "pkg/*" -s "wasm-pack build"
ashleygwilliams commented 5 years ago

update! looking to do this soon :) cc @fitzgen https://github.com/rustwasm/rfcs/pull/10/commits/8aae141bb09eb91b50a53e74bc33bd95813b9da9

boringcactus commented 4 years ago

there's a draft implementation of this (and the proposed serve command from rustwasm/rfcs#10 as well) in #745, for what it's worth

jasonwilliams commented 2 years ago

@ashleygwilliams @boringcactus what happened to this? Is there still any work in progress?

pastelmind commented 2 years ago

I hope this comes through. I used onchange because I didn't want to force fellow developers to install cargo-watch, but having Watch Mode built in would be great.

matthiasgeihs commented 1 year ago

Any news?