diff options
author | Lars Wirzenius <liw@liw.fi> | 2020-09-03 10:21:08 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2020-09-04 10:30:18 +0300 |
commit | 803a8b1d879e0c7ec005b2652f06459f58956379 (patch) | |
tree | d7e87cb4c403bede8d4b83bc72f2d44149a6341d /templates | |
parent | 6c88187985ce5bb9203619181ab667b541c7cd55 (diff) | |
download | subplot-803a8b1d879e0c7ec005b2652f06459f58956379.tar.gz |
feat(codegen): allow templates to list helper files
A template's YAML file can now list any additional files, called
helpers. An empty list is OK, as is not having the 'helper' key in the
YAML file. The helpers are loaded as Tera templates so they can be
included in the main template.
This will allow us to split out un-templated code out of the main
template. The helpers can then be linted and unit tested separately.
This commit only adds the mechanism, and fixes up the YAML files.
Later commits will actually split the main Python template into
helpers, and add unit tests.
refactor: use .join
Diffstat (limited to 'templates')
-rw-r--r-- | templates/python/template.yaml | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/templates/python/template.yaml b/templates/python/template.yaml index dca668d..c3ded5a 100644 --- a/templates/python/template.yaml +++ b/templates/python/template.yaml @@ -1,2 +1,3 @@ template: template.py +helpers: [] run: python3 |