initial template for app based on wuttaweb
with e.g. `poser install` command
This commit is contained in:
commit
46b33a622f
18 changed files with 344 additions and 0 deletions
|
@ -0,0 +1,30 @@
|
|||
# -*- coding: utf-8; -*-
|
||||
"""
|
||||
{{cookiecutter.project_name}} CLI
|
||||
"""
|
||||
|
||||
import typer
|
||||
|
||||
from wuttjamaican.cli import make_typer
|
||||
|
||||
|
||||
{{cookiecutter.package_name}}_typer = make_typer(
|
||||
name='{{cookiecutter.package_name}}',
|
||||
help="{{cookiecutter.project_name}} -- {{cookiecutter.project_short_description}}"
|
||||
)
|
||||
|
||||
|
||||
@{{cookiecutter.package_name}}_typer.command()
|
||||
def install(
|
||||
ctx: typer.Context,
|
||||
):
|
||||
"""
|
||||
Install the {{cookiecutter.project_name}} app
|
||||
"""
|
||||
config = ctx.parent.wutta_config
|
||||
app = config.get_app()
|
||||
install = app.get_install_handler(pkg_name='{{cookiecutter.package_name}}',
|
||||
app_title="{{cookiecutter.project_name}}",
|
||||
pypi_name='{{cookiecutter.distribution_name}}',
|
||||
egg_name='{{cookiecutter.__egg_name}}')
|
||||
install.run()
|
Loading…
Add table
Add a link
Reference in a new issue