diff options
author | Daniel Silverstone <dsilvers@digital-scurf.org> | 2022-10-22 11:00:01 +0100 |
---|---|---|
committer | Daniel Silverstone <dsilvers@digital-scurf.org> | 2022-10-22 11:00:01 +0100 |
commit | 03c871ab0cba16d355de0145f47acd547262ac4b (patch) | |
tree | d906294369f39b9e8a76ea7122b00adf83b7ebd4 | |
parent | 990c506d347a6aa09af68bc6de670858cf59f133 (diff) | |
download | subplot-03c871ab0cba16d355de0145f47acd547262ac4b.tar.gz |
(subplot.md): Add scenario about not needing a template for docgen
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
-rw-r--r-- | subplot.md | 34 |
1 files changed, 34 insertions, 0 deletions
@@ -1123,6 +1123,40 @@ But there are no scenarios in this file, and thus nothing can be generated in a ~~~ +## No template means you can docgen but not codegen + +When running `docgen` you do not **need** a template to have been defined in the +subplot input document. If you have template-specific bindings then you **should** +provide one, but if not, then it is unnecessary. This means you can use `docgen` +to build documents before you have any inkling of the implementation language +necessary to validate the scenarios. + +~~~scenario +given file notemplate.subplot +given file notemplate.md +and an installed subplot +when I run subplot docgen notemplate.subplot -o notemplate.html +then file notemplate.html exists +when I try to run subplot codegen notemplate.subplot -o test.py +then command fails +and stderr contains "document has no template" +~~~ + +~~~{#notemplate.subplot .file .yaml .numberLines} +title: No templates in here +markdowns: [notemplate.md] +impls: { } +~~~ + +~~~{#notemplate.md .file .markdown .numberLines} +# This is a title + +```scenario +then failure ensues +``` + +~~~ + ## Keywords Subplot supports the keywords **given**, **when**, and **then**, and |