Rebased after #438
This commit is contained in:
parent
1b5137c84e
commit
d37821c194
|
@ -3,7 +3,7 @@ extern crate staticfile;
|
||||||
extern crate ws;
|
extern crate ws;
|
||||||
|
|
||||||
use std;
|
use std;
|
||||||
use std::path::{Path, PathBuf};
|
use std::path::PathBuf;
|
||||||
use self::iron::{status, AfterMiddleware, Chain, Iron, IronError, IronResult, Request, Response,
|
use self::iron::{status, AfterMiddleware, Chain, Iron, IronError, IronResult, Request, Response,
|
||||||
Set};
|
Set};
|
||||||
use clap::{App, ArgMatches, SubCommand};
|
use clap::{App, ArgMatches, SubCommand};
|
||||||
|
|
|
@ -75,17 +75,17 @@ where
|
||||||
};
|
};
|
||||||
|
|
||||||
// Add the theme directory to the watcher
|
// Add the theme directory to the watcher
|
||||||
watcher.watch(book.get_theme_path(), Recursive)
|
watcher.watch(book.theme_dir(), Recursive)
|
||||||
.unwrap_or_default();
|
.unwrap_or_default();
|
||||||
|
|
||||||
// Add the book.{json,toml} file to the watcher if it exists, because it's not
|
// Add the book.{json,toml} file to the watcher if it exists, because it's not
|
||||||
// located in the source directory
|
// located in the source directory
|
||||||
if watcher.watch(book.get_root().join("book.json"), NonRecursive)
|
if watcher.watch(book.root.join("book.json"), NonRecursive)
|
||||||
.is_err()
|
.is_err()
|
||||||
{
|
{
|
||||||
// do nothing if book.json is not found
|
// do nothing if book.json is not found
|
||||||
}
|
}
|
||||||
if watcher.watch(book.get_root().join("book.toml"), NonRecursive)
|
if watcher.watch(book.root.join("book.toml"), NonRecursive)
|
||||||
.is_err()
|
.is_err()
|
||||||
{
|
{
|
||||||
// do nothing if book.toml is not found
|
// do nothing if book.toml is not found
|
||||||
|
|
|
@ -46,4 +46,3 @@ use tempdir::TempDir;
|
||||||
// assert_eq!(book.get_destination(), dir.path().join("baz"));
|
// assert_eq!(book.get_destination(), dir.path().join("baz"));
|
||||||
// assert_eq!(book.get_mathjax_support(), true);
|
// assert_eq!(book.get_mathjax_support(), true);
|
||||||
// }
|
// }
|
||||||
>>>>>>> Integration tests pass again
|
|
||||||
|
|
Loading…
Reference in New Issue