Keats / kickstart

A scaffolding tool to get new projects up and running quickly
MIT License
359 stars 24 forks source link

Add a `cleanup` field to schema #7

Closed Keats closed 6 years ago

Keats commented 6 years ago

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:

cleanup = [
# If we're not using docker, delete the related files
 { name = "use_docker", value = false, paths = ["scripts/docker", "docs/docker.md"] }
]
Keats commented 6 years ago

Hurdle: it needs to allow templated paths