Watch both book.json and book.toml

This commit is contained in:
Matt Brubeck 2017-01-01 16:00:21 -08:00
parent 1ac2602360
commit c7b4147ba7
1 changed files with 4 additions and 0 deletions

View File

@ -332,6 +332,10 @@ fn trigger_on_change<F>(book: &mut MDBook, closure: F) -> ()
if let Err(_) = watcher.watch(book.get_root().join("book.json"), NonRecursive) { if let Err(_) = watcher.watch(book.get_root().join("book.json"), NonRecursive) {
// do nothing if book.json is not found // do nothing if book.json is not found
} }
if let Err(_) = watcher.watch(book.get_root().join("book.toml"), NonRecursive) {
// do nothing if book.toml is not found
}
println!("\nListening for changes...\n"); println!("\nListening for changes...\n");
loop { loop {