Crates.io | watchdo |
lib.rs | watchdo |
version | 0.1.2 |
source | src |
created_at | 2020-02-04 07:19:38.355372 |
updated_at | 2020-02-12 21:50:54.582185 |
description | Run commands whenever files in a directory change. |
homepage | https://github.com/shelbyd/watchdo |
repository | https://github.com/shelbyd/watchdo |
max_upload_size | |
id | 204796 |
size | 55,606 |
watchdo
runs commands when watched files change. It's great for TDD workflows and/or reloading servers when sources change.
Install with cargo:
cargo install watchdo
Run tests when source files change:
watchdo 'cargo test --color=always'
Most commands don't emit colors when writing to a program. They'll often have options to include colors anyway.
Run longer tests only after the previous ones pass.
watchdo 'cargo test' 'cargo test --features="integration"' 'cargo test --features="end2end"'
Run a server with the latest passing version.
watchdo 'cargo test' --server='cargo run'
watchdo
doesn't do anything special with the file system.
It assumes all your commands run based on the state of the filesystem when the command started.
If a test passes or fails incorrectly because the filesystem changed since it started, another run will start soon.
watchdo
ignores files ignored by version control according to the ignore
crate.
You can specify the sub-directory to watch with --watch-dir
.