For documentation about the original Cookiecutter package, refer to https://github.com/cookiecutter/cookiecutter.
The Devoteam fork of Cookiecutter uses cookiecutter.yaml files instead of cookiecutter.json to define variables. An example can be found here.
Field name | Type | Required | Description |
---|---|---|---|
name | string | Yes | Name of the Cookiecutter variable |
value | any | No | Default value of the variable |
prompt | string | No | Human readable prompt for the variable |
variables | list of Variable | No | Nested variables |
matches | any | No | Condition for nested variables. If 'matches' in parent variable is equal to 'value' in child variable, the user will be prompted to input a value for the child variable |
metadata | dict | No | Metadata about the variable |
Cookiecutter supports template hierarchy, therefore allowing the user to choose between different templates. This is done by specifying the template hierarchy in the cookiecutter.yaml file. An example can be found here.
Define one Cookiecutter Variable named template with a metadata field. Add these fields to the metadata dictionary:
Field name | Type | Required | Description |
---|---|---|---|
name | string | Yes | Name of the Cookiecutter template |
description | string | No | Short description of the template |
path | string | Yes | Path to the template folder |