BAKE_OPTIONS=--no-input

help:
	@echo bake    "generate project using defaults"
	@echo watch   "generate project using defaults and watch for changes"
	@echo replay  "replay last cookiecutter run and watch for changes"

bake:
	cookiecutter $(BAKE_OPTIONS) . --overwrite-if-exists

.PHONY: watch
watch: bake
	watchmedo shell-command -p '*.*' -c 'make bake -e BAKE_OPTIONS=$(BAKE_OPTIONS)' -W -R -D \{{cookiecutter.project_slug}}/

.PHONY: replay
replay: BAKE_OPTIONS=--replay
replay: watch
