Watch both book.json and book.toml
This commit is contained in:
parent
1ac2602360
commit
c7b4147ba7
|
@ -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 {
|
||||||
|
|
Loading…
Reference in New Issue