Test 2
This commit is contained in:
32
main.py
32
main.py
@@ -1,6 +1,30 @@
|
||||
import typer
|
||||
from cookiecutter.main import cookiecutter
|
||||
|
||||
cookiecutter("cookiecutter-test",
|
||||
# directory=".",
|
||||
extra_context={"foo": "quz"},
|
||||
output_dir="test_output")
|
||||
# cookiecutter("cookiecutter-test",
|
||||
# # directory=".",
|
||||
# extra_context={"foo": "quz"},
|
||||
# output_dir="test_output")
|
||||
|
||||
|
||||
app = typer.Typer()
|
||||
|
||||
|
||||
@app.command()
|
||||
def create_project(project_name: str,
|
||||
template: str = "cookiecutter-test",
|
||||
output_dir: str = ".",
|
||||
use_database: bool = True,
|
||||
use_cache: bool = True,
|
||||
):
|
||||
typer.echo(f"Creating project {project_name}")
|
||||
cookiecutter(template,
|
||||
extra_context={
|
||||
"use_database": use_database,
|
||||
"use_cache": use_cache,
|
||||
},
|
||||
output_dir=output_dir)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
app()
|
||||
|
||||
Reference in New Issue
Block a user