Commit Graph

17 Commits

Author SHA1 Message Date
Matt Ickstadt
5835da2432 Run rustfmt 2018-07-23 12:47:04 -05:00
Michael Bryan
fd7e8d1b7b
Add support for alternative backends (#507)
* Added a mechanism for creating alternate backends

* Added a CmdRenderer and the ability to have multiple renderers

* Made MDBook::load() autodetect renderers

* Added a couple methods to RenderContext

* Converted RenderContext.version to a String

* Made sure all alternate renderers are invoked as `mdbook-*`

* Factored out the logic for determining which renderer to use

* Added tests for renderer detection

* Made it so `mdbook test` works on the book-example again

* Updated the "For Developers" docs

* Removed `[output.epub]` from the example book's book.toml

* Added a bit more info on how backends should work

* Added a `destination` key to the RenderContext

* Altered how we wait for an alternate backend to finish

* Refactored the Renderer trait to not use MDBook and moved livereload to the template

* Moved info for developers out of the book.toml format chapter

* MOAR docs

* MDBook::build() no longer takes &mut self

* Replaced a bunch of println!()'s with proper log macros

* Cleaned up the build() method and backend discovery

* Added a couple notes and doc-comments

* Found a race condition when backends exit really quickly

* Added support for backends with arguments

* Fixed a funny doc-comment
2018-01-07 22:10:48 +08:00
Michael Bryan
e74c376833
You need to call rx.iter() to iterate over events from a channel (#522) 2018-01-03 19:32:49 +08:00
Michael Bryan
396426662d
Made mdbook watch and mdbook serve rebuild the book again (#508)
Made `mdbook watch` and `mdbook serve` rebuild the book again
2017-12-13 12:04:24 +11:00
Michael Bryan
47eb4788cb
Introduced the BookBuilder.
- You now use a `BookBuilder` for creating a book directory tree

- This also removes the `--no-create` argument
2017-12-10 22:49:40 +11:00
Chris Spiegel
b0b09bad3f Clean up build configuration.
This rolls all "create missing" handling into BuildConfig, and moves the
build-dir option from the "book" table to the "build" table. Some
documentation cleanup surrounding the build table is also updated.
2017-11-30 07:39:58 -08:00
Michael Bryan
d37821c194
Rebased after #438 2017-11-12 21:37:38 +08:00
Michael Bryan
ddb0834da8
Upgraded binaries to new configuration API 2017-11-12 21:37:36 +08:00
Pratik Karki
382fc4139b run rustfmt on the repository #398(Updated) (#438)
rustfmt the repository #398
2017-10-03 13:40:23 +02:00
Michal Budzynski
b1ca9cf5b5 HtmlConfig is no longer optional
`HtmlConfig` was both guaranteed to exist within `BookConfig`
and `expect`ed in few places.
This simplifies the API a little by representing the fact that
`HtmlConfig` is currently mandatory for proper mdBook binary operation.
2017-06-27 14:01:33 +02:00
Michal Budzynski
7f51039f9a Rename and move the clap sub-command generation functions 2017-06-27 07:59:50 +02:00
Michal Budzynski
7799ce285e Do not use wildcard imports if not needed 2017-06-26 23:17:46 +02:00
Michal Budzynski
fe62d0c407 Merge remote-tracking branch 'upstream/master' into split_commands 2017-06-26 23:11:00 +02:00
Michal Budzynski
35ed9fc286 corrected indentation in serve and watch subcommands definitions 2017-06-26 01:22:38 +02:00
Michal Budzynski
b09fdf07e4 Register serve and watch subcommands only if given features enabled 2017-06-26 00:43:28 +02:00
Michal Budzynski
5c524da3c2 Extracted mdbook watch to separate file/module 2017-06-25 23:44:28 +02:00
Michal Budzynski
99224f40d5 Extracted mdbook serve to separate file/module 2017-06-25 23:05:58 +02:00