Support nested config files#1770
Merged
ericof merged 8 commits intocookiecutter:mainfrom Jun 13, 2023
dariocurr:master
Merged
Conversation
Contributor
Author
|
Any news? |
|
FWIW my organization would use this if this MR can be merged in. |
Contributor
Author
Seems like no one from the team cares about this PR |
This was referenced Jan 11, 2023
ericof
approved these changes
Jun 13, 2023
Member
ericof
left a comment
There was a problem hiding this comment.
Thank you, @dariocurr, and sorry for the long time it took us to review your PR.
Contributor
Author
|
Thank you |
|
This was a breaking change for users who already used the Perhaps it would be better for special keywords to be prefixed with |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If you wish to create a hierarchy of templates and use cookiecutter to choose among them,
you need just to specify the key
templatein the main configuration file to reachthe other ones.
Let's imagine to have the following structure:
It is possible to specify in the main
cookiecutter.jsonhow to reach the otherconfig files as follows:
{ "template": [ "Project 1 (./project-1)", "Project 2 (./project-2)" ] }Then, when
cookiecutteris launched in the main directory it will ask to choiceamong the possible templates:
Once a template is chosen, for example
1, it will continue to ask the info required bycookiecutter.jsonin theproject-1folder, such asproject-slug