Skip to content

Commit d6f2ad2

Browse files
committed
✨ Add the copier answer file to template
This can be used later to update the template more easily with `copier update`. A few notes to make the changes more clear: 1. The file is named `{{ _copier_conf.answers_file }}.jinja` to use the `copier` configuration to template the filename, should we ever change it in the `copier.yml` file. This is recommended by the documentation. 2. We place the file in the `template` directory, else it is not actually generated when we run `copier copy`. 3. The contents are also entirely dictated by the documentation, but they make sense. The `_copier_answers` will contain the answers given by the user, and it seems they wrote a `to_nice_yaml` to make it easier to write to the targetted YAML file. We link the corresponding documentation here for reference: https://copier.readthedocs.io/en/latest/configuring/#the-copier-answersyml-file
1 parent 123bb3c commit d6f2ad2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
2+
{{ _copier_answers|to_nice_yaml -}}

0 commit comments

Comments
 (0)