diff --git a/.gitignore b/.gitignore index 5d381cc..fff92a1 100644 --- a/.gitignore +++ b/.gitignore @@ -160,3 +160,4 @@ cython_debug/ # option (not recommended) you can uncomment the following to ignore the entire idea folder. #.idea/ +test_output/ \ No newline at end of file diff --git a/cookiecutter-test/cookiecutter.json b/cookiecutter-test/cookiecutter.json new file mode 100644 index 0000000..d409c52 --- /dev/null +++ b/cookiecutter-test/cookiecutter.json @@ -0,0 +1,4 @@ +{ + "project_slug": "sample", + "foo": "bar" +} diff --git a/cookiecutter-test/{{cookiecutter.project_slug}}/main.py b/cookiecutter-test/{{cookiecutter.project_slug}}/main.py new file mode 100644 index 0000000..872af4e --- /dev/null +++ b/cookiecutter-test/{{cookiecutter.project_slug}}/main.py @@ -0,0 +1,8 @@ + +print("{{cookiecutter.project_slug}}") + +{% if cookiecutter.foo == "bar" %} +print("{{cookiecutter.foo}}") +{% else %} +# print("{{cookiecutter.foo}}") +{% endif %} diff --git a/main.py b/main.py new file mode 100644 index 0000000..bafd7d2 --- /dev/null +++ b/main.py @@ -0,0 +1,6 @@ +from cookiecutter.main import cookiecutter + +cookiecutter("cookiecutter-test", + # directory=".", + extra_context={"foo": "quz"}, + output_dir="test_output") diff --git a/req.txt b/req.txt new file mode 100644 index 0000000..b5ae616 --- /dev/null +++ b/req.txt @@ -0,0 +1 @@ +cookiecutter==2.5.0