Skip to content

Commit ebf178d

Browse files
committed
Move cookiecutter filters to a Jinja2 extension
By using a full fledged Jinja2 extension we can not only add filters but also variables. This also simplifies the `cookiecutter.json` file, as we don't need to enumerate every single filter we want to use. This also simplifies the template update process as when new fitlers are added there is no need to update the cookiecutter replay file, also minimizing chances of weird erros when that happens. Signed-off-by: Leandro Lucarella <[email protected]>
1 parent 9a7bbe9 commit ebf178d

File tree

3 files changed

+258
-232
lines changed

3 files changed

+258
-232
lines changed

cookiecutter/cookiecutter.json

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,6 @@
2323
"github_repo_name": "{{cookiecutter | github_repo_name}}",
2424
"default_codeowners": "(like @some-org/some-team; defaults to a team based on the repo type)",
2525
"_extensions": [
26-
"local_extensions.as_identifier",
27-
"local_extensions.default_codeowners",
28-
"local_extensions.github_repo_name",
29-
"local_extensions.introduction",
30-
"local_extensions.keywords",
31-
"local_extensions.pypi_package_name",
32-
"local_extensions.python_package",
33-
"local_extensions.src_path",
34-
"local_extensions.title"
26+
"local_extensions.RepoConfigExtension"
3527
]
3628
}

0 commit comments

Comments
 (0)