Keats / kickstart

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

Add support for subdirectories in repositories #23

Closed whitfin closed 6 years ago

whitfin commented 6 years ago

This PR will add support for a -s flag, which allows usage of a subdirectory inside a template. This would allow a couple of cool things:

I thought about filing an issue, but whilst I was looking I figured I'd just file a PR for it. Do you have any thoughts? I picked the flag/option on a whim, so happy to change!

Keats commented 6 years ago

I am not sure about that feature. That would encourages people not having CI for their templates which would result in a lower quality ecosystem overall. Some templates like https://github.com/pydanny/cookiecutter-djangocan get big enough that they get as much activity as a real project so having a repo of them doesn't really work imo. Having a list of templates repos is a better way to organise it

whitfin commented 6 years ago

Allowing this option would let authors choose where to host their templates. For example, I would never use a separate repo as I much prefer a shared history between templates and the code it’s based on. Having to split out a separate repo is harder to maintain.

There are cases (like you said) where it makes sense to have a whole repo if the template is large, but this change doesn’t stop people doing that (and it's still the default).

In terms of CI, I think it’s probably more likely that people with templates in their main repo would just include that in their existing CI, rather than having to set it all up again for a new repo.

Keats commented 6 years ago

Can you add some tests for that?

whitfin commented 6 years ago

@Keats added some tests! Pretty much just the same ones that were there using the subdir option.

Keats commented 6 years ago

Thanks!