Commit Graph

13 Commits

Author SHA1 Message Date
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
9950f69c48
Removed the MDBook::read_config() method because it's redundant now 2017-12-10 23:13:46 +11:00
Michael Bryan
751da4f05f
Added a test to make sure you can include rust files in chapters 2017-12-10 22:59:35 +11:00
Michael Bryan
f993677626
All tests finally pass! 2017-12-10 22:52:00 +11:00
Michael Bryan
21498631b3
Made sure the dummy book can build 2017-12-10 22:50:57 +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
Michael Bryan
42ff5a895c
Added a test to make sure book.toml isn't required 2017-12-09 20:46:39 +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
18c725ee12
Integration tests pass again 2017-11-12 21:37:37 +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
Michael Bryan
e2eb40bded Got some feedback from azerupi and added a DummyBook builder 2017-08-02 22:29:28 +08:00
Michael Bryan
0c3a2b80f8 Tested MDBook::init with custom args 2017-07-10 18:23:51 +08:00
Michael Bryan
29e00c0d97 Broke the integration tests out into individual sections 2017-07-10 18:17:19 +08:00