Since we can't call arbitrary scripts, a solution would be to add a field to template.toml with things to delete after generation:
cleanup = [
# If we're not using docker, delete the related files
{ name = "use_docker", value = false, paths = ["scripts/docker", "docs/docker.md"] }
]
cookiecutter can use postgen hooks to clean up files/directory once done in python script: https://github.com/pydanny/cookiecutter-django/blob/master/hooks/post_gen_project.py
Since we can't call arbitrary scripts, a solution would be to add a field to
template.toml
with things to delete after generation: