Skip to content

Commit

Permalink
Re-implement rustbook in terms of mdbook
Browse files Browse the repository at this point in the history
mdbook has a lot of optional dependencies that we don't want, so instead
of using it directly, we re-build rustbook to use mdbook as a library.
For convenience' sake, we keep the same CLI interface as mdbook; the
only difference is that it only accepts build and test subcommands,
rather than the full range.
  • Loading branch information
steveklabnik committed Feb 13, 2017
1 parent 717ac96 commit a076961
Show file tree
Hide file tree
Showing 19 changed files with 311 additions and 972 deletions.
216 changes: 215 additions & 1 deletion src/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/bootstrap/doc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ pub fn rustbook(build: &Build, target: &str, name: &str) {
build.run(build.tool_cmd(&compiler, "rustbook")
.arg("build")
.arg(&src)
.arg("-d")
.arg(out));
}

Expand Down
3 changes: 3 additions & 0 deletions src/doc/book/src/SUMMARY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Summary

- [Chapter 1](./chapter_1.md)
1 change: 1 addition & 0 deletions src/doc/book/src/chapter_1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Chapter 1
3 changes: 3 additions & 0 deletions src/doc/nomicon/src/SUMMARY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Summary

- [Chapter 1](./chapter_1.md)
1 change: 1 addition & 0 deletions src/doc/nomicon/src/chapter_1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Chapter 1
13 changes: 8 additions & 5 deletions src/tools/rustbook/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
[package]
authors = ["The Rust Project Developers"]
name = "rustbook"
version = "0.0.0"
build = false
version = "0.1.0"
license = "MIT/Apache-2.0"

[[bin]]
name = "rustbook"
path = "main.rs"
[dependencies]
clap = "2.19.3"

[dependencies.mdbook]
version = "0.0.14"
default-features = false
Loading

0 comments on commit a076961

Please sign in to comment.