Skip to content

Commit 4074560

Browse files
committed
Finish move of MDBook to mdbook-driver
1 parent 5a31947 commit 4074560

File tree

30 files changed

+381
-383
lines changed

30 files changed

+381
-383
lines changed

Cargo.lock

Lines changed: 4 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ sha2 = "0.10.9"
4444
shlex = "1.3.0"
4545
tempfile = "3.20.0"
4646
toml = "0.5.11" # Do not update, see https://github.com/rust-lang/mdBook/issues/2037
47+
topological-sort = "0.2.2"
4748

4849
[package]
4950
name = "mdbook"
@@ -86,7 +87,6 @@ serde_json.workspace = true
8687
shlex.workspace = true
8788
tempfile.workspace = true
8889
toml.workspace = true
89-
topological-sort = "0.2.2"
9090

9191
# Watch feature
9292
notify = { version = "8.0.0", optional = true }

crates/mdbook-driver/Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,16 @@ rust-version.workspace = true
1111
anyhow.workspace = true
1212
log.workspace = true
1313
mdbook-core.workspace = true
14+
mdbook-html.workspace = true
1415
mdbook-preprocessor.workspace = true
1516
mdbook-renderer.workspace = true
17+
mdbook-summary.workspace = true
1618
regex.workspace = true
1719
serde_json.workspace = true
1820
shlex.workspace = true
21+
tempfile.workspace = true
1922
toml.workspace = true
23+
topological-sort.workspace = true
2024

2125
[lints]
2226
workspace = true

crates/mdbook-driver/src/builtin_preprocessors/cmd.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,15 +170,14 @@ impl Preprocessor for CmdPreprocessor {
170170
}
171171
}
172172

173-
#[cfg(false)] // Needs to wait for MDBook transfer
174173
#[cfg(test)]
175174
mod tests {
176175
use super::*;
177176
use crate::MDBook;
178177
use std::path::Path;
179178

180179
fn guide() -> MDBook {
181-
let example = Path::new(env!("CARGO_MANIFEST_DIR")).join("guide");
180+
let example = Path::new(env!("CARGO_MANIFEST_DIR")).join("../../guide");
182181
MDBook::load(example).unwrap()
183182
}
184183

crates/mdbook-driver/src/init.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//! Support for initializing a new book.
2+
13
use std::fs::{self, File};
24
use std::io::Write;
35
use std::path::PathBuf;

crates/mdbook-driver/src/lib.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,8 @@
22
33
pub mod builtin_preprocessors;
44
pub mod builtin_renderers;
5+
pub mod init;
6+
mod load;
7+
mod mdbook;
8+
9+
pub use mdbook::MDBook;

0 commit comments

Comments
 (0)