summaryrefslogtreecommitdiff
path: root/subplot-build/src
AgeCommit message (Collapse)AuthorFilesLines
2023-05-18feat: export SubplotError from subplot-build crateLars Wirzenius1-1/+2
This will allow better error messages from projects' build.rs. Sponsored-by: author
2023-05-10feat! allow multiple markdown files for a subplotLars Wirzenius1-1/+3
Sponsored-by: author
2022-09-06feat! read document metadata from a YAML fileLars Wirzenius1-0/+1
This is a huge change all in one commit, sorry. However, as it changes a fundamental part of the command line interface (namely, what constitutes as the input file), there doesn't seem a way to break this into a tidy series of small commits. Most of the diff is in subplot.md, where every scenario that invokes Subplot needs multiple changes, thus touching much of the file. The overall change is that where we previously had document metadata in embedded YAML in the Markdown file, we now have it in a separate YAML file. The Markdown file is named in the YAML file. We still parse the Markdown with Pandoc for everything, except codegen. Switching from Pandoc to pulldown_cmark for parsing will be another big change that I didn't want to include in this huge change set. Sponsored-by: author
2022-05-05refactor: drop the subplot::Result type aliasLars Wirzenius1-2/+2
Replace subplot::Result<T> with Result<T, SubplotError>. I find this now to be clearer, as I don't need to remind myself which Result is being used where. This should not be a breaking change. Sponsored-by: author
2021-11-19various: Rework document to support multiple implementationsDaniel Silverstone1-5/+10
In order to eventually shift the document metadata to support more than one template defined for the document this reworks all the internal APIs to expect templates, and also the external CLI to be able to provide it. Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2021-10-13feat: add crate subplot-build for using Subplot from build.rsLars Wirzenius1-0/+83
Make it easy to generate test code from a subplot in another project's `build.rs` script. Move the code to load documents and generate test code from src/bin/subplot.rs and src/bin/cli/mod.rs to src/doc.rs so it can be used without using the subplot executable. Make the add_search_path function public so it can be used outside its module. The subplot executable arranged for the directory where the markdown input file resides to be added to the search path via another way. Sponsored-by: pep.foundation