mdBook/Cargo.toml

62 lines
1.3 KiB
TOML
Raw Normal View History

2015-07-06 20:21:59 +08:00
[package]
name = "mdbook"
version = "0.0.26-alpha.0"
2015-07-06 20:21:59 +08:00
authors = ["Mathieu David <mathieudavid@mathieudavid.org>"]
2015-08-07 05:37:44 +08:00
description = "create books from markdown files (like Gitbook)"
documentation = "http://azerupi.github.io/mdBook/index.html"
repository = "https://github.com/azerupi/mdBook"
keywords = ["book", "gitbook", "rustbook", "markdown"]
license = "MPL-2.0"
2015-08-07 05:37:44 +08:00
readme = "README.md"
build = "build.rs"
2015-08-07 05:37:44 +08:00
exclude = [
"book-example/*",
"src/theme/stylus/**",
2015-08-07 05:37:44 +08:00
]
2015-07-07 03:12:24 +08:00
[dependencies]
2017-05-18 17:56:04 +08:00
clap = "2.24"
2017-09-12 01:38:10 +08:00
handlebars = "0.29"
2017-05-18 17:56:04 +08:00
serde = "1.0"
2017-05-19 01:32:08 +08:00
serde_derive = "1.0"
2017-09-12 01:38:10 +08:00
error-chain = "0.11.0"
2017-05-18 17:56:04 +08:00
serde_json = "1.0"
2017-09-12 01:38:10 +08:00
pulldown-cmark = "0.1"
lazy_static = "0.2"
log = "0.3"
2017-02-17 06:17:26 +08:00
env_logger = "0.4.0"
toml = "0.4"
2017-01-02 01:42:47 +08:00
open = "1.1"
2017-02-17 06:11:16 +08:00
regex = "0.2.1"
tempdir = "0.3.4"
# Watch feature
2017-02-19 09:24:27 +08:00
notify = { version = "4.0", optional = true }
2016-03-20 00:45:58 +08:00
time = { version = "0.1.34", optional = true }
2017-09-12 01:38:10 +08:00
crossbeam = { version = "0.3", optional = true }
2016-04-02 10:46:05 +08:00
# Serve feature
iron = { version = "0.5", optional = true }
staticfile = { version = "0.4", optional = true }
2017-05-18 17:56:04 +08:00
ws = { version = "0.7", optional = true}
2016-04-02 10:46:05 +08:00
Created a SUMMARY.md parser and basic Loader From the [pull request comment][pr], here's a rough summary of what was done in the squashed commits. --- \# Summary Parser - Added a private submodule called `mdbook::loader::summary` which contains all the code for parsing `SUMMARY.md` - A `Summary` contains a title (optional), then some prefix, numbered, and suffix chapters (technically `Vec<SummaryItem>`) - A `SummaryItem` is either a `Link` (i.e. link to a chapter), or a separator - A `Link` contains the chapter name, its location relative to the book's `src/` directory, and a list of nested `SummaryItems` - The `SummaryParser` (a state machine-based parser) uses `pulldown_cmark` to turn the `SUMMARY.md` string into a stream of `Events`, it then iterates over those events changing its behaviour depending on the current state, - The states are `Start`, `PrefixChapters`, `NestedChapters(u32)` (the `u32` represents your nesting level, because lists can contain lists), `SuffixChapters`, and `End` - Each state will read the appropriate link and build up the `Summary`, skipping any events which aren't a link, horizontal rule (separator), or a list \# Loader - Created a basic loader which can be used to load the `SUMMARY.md` in a directory. \# Tests - Added a couple unit tests for each state in the parser's state machine - Added integration tests for parsing a dummy SUMMARY.md then asserting the result is exactly what we expected [pr]: https://github.com/azerupi/mdBook/pull/371#issuecomment-312636102
2017-06-24 22:47:03 +08:00
# Tests
[dev-dependencies]
tempdir = "0.3.4"
[build-dependencies]
2017-09-12 01:38:10 +08:00
error-chain = "0.11"
[features]
2016-04-02 10:46:05 +08:00
default = ["output", "watch", "serve"]
debug = []
output = []
regenerate-css = []
watch = ["notify", "time", "crossbeam"]
2016-04-03 02:04:51 +08:00
serve = ["iron", "staticfile", "ws"]
2015-08-06 18:38:48 +08:00
[[bin]]
doc = false
name = "mdbook"
path = "src/bin/mdbook.rs"