diff options
author | Eric Huss <eric@huss.org> | 2022-11-13 12:53:19 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-13 12:53:19 -0800 |
commit | 666975a1eff95d6e3bd7a2b86e627c006c7da58f (patch) | |
tree | 9261640cd20ffd8bac3b9230058ddcfcdb4e867a /src/config.rs | |
parent | 3a24f10d7cdb01a0da36f2f34db013b0d9c71317 (diff) | |
parent | 144a1e4009a80c3eb01775963a9c9349ecc00e02 (diff) |
Merge pull request #1884 from willcrichton/master
Add support for watching additional directories
Diffstat (limited to 'src/config.rs')
-rw-r--r-- | src/config.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/config.rs b/src/config.rs index 6b8f1414..d9696ea5 100644 --- a/src/config.rs +++ b/src/config.rs @@ -438,6 +438,8 @@ pub struct BuildConfig { /// Should the default preprocessors always be used when they are /// compatible with the renderer? pub use_default_preprocessors: bool, + /// Extra directories to trigger rebuild when watching/serving + pub extra_watch_dirs: Vec<PathBuf>, } impl Default for BuildConfig { @@ -446,6 +448,7 @@ impl Default for BuildConfig { build_dir: PathBuf::from("book"), create_missing: true, use_default_preprocessors: true, + extra_watch_dirs: Vec::new(), } } } @@ -772,6 +775,7 @@ mod tests { build_dir: PathBuf::from("outputs"), create_missing: false, use_default_preprocessors: true, + extra_watch_dirs: Vec::new(), }; let rust_should_be = RustConfig { edition: None }; let playground_should_be = Playground { @@ -982,6 +986,7 @@ mod tests { build_dir: PathBuf::from("my-book"), create_missing: true, use_default_preprocessors: true, + extra_watch_dirs: Vec::new(), }; let html_should_be = HtmlConfig { |