2021.4 #19
@ -1,5 +1,6 @@
|
||||
import textwrap
|
||||
|
||||
from cpl.utils.string import String
|
||||
from cpl_cli.templates.template_file_abc import TemplateFileABC
|
||||
|
||||
|
||||
@ -8,6 +9,7 @@ class ApplicationTemplate(TemplateFileABC):
|
||||
def __init__(self, name: str):
|
||||
TemplateFileABC.__init__(self)
|
||||
|
||||
name = String.convert_to_snake_case(name)
|
||||
self._name = 'application.py'
|
||||
self._path = f'src/{name}_cli/'
|
||||
self._value = textwrap.dedent("""\
|
||||
|
@ -1,5 +1,6 @@
|
||||
import textwrap
|
||||
|
||||
from cpl.utils.string import String
|
||||
from cpl_cli.templates.template_file_abc import TemplateFileABC
|
||||
|
||||
|
||||
@ -8,6 +9,7 @@ class CLIInitTemplate(TemplateFileABC):
|
||||
def __init__(self, name: str):
|
||||
TemplateFileABC.__init__(self)
|
||||
|
||||
name = String.convert_to_snake_case(name)
|
||||
self._name = '__init__.py'
|
||||
self._path = f'src/{name}_cli/'
|
||||
self._value = textwrap.dedent("""\
|
||||
|
@ -1,5 +1,6 @@
|
||||
import textwrap
|
||||
|
||||
from cpl.utils.string import String
|
||||
from cpl_cli.templates.template_file_abc import TemplateFileABC
|
||||
|
||||
|
||||
@ -8,6 +9,7 @@ class MainWithApplicationHostAndStartupTemplate(TemplateFileABC):
|
||||
def __init__(self, name: str):
|
||||
TemplateFileABC.__init__(self)
|
||||
|
||||
name = String.convert_to_snake_case(name)
|
||||
self._name = 'main.py'
|
||||
self._path = f'src/{name}_cli/'
|
||||
self._value = textwrap.dedent(f"""\
|
||||
|
@ -1,5 +1,6 @@
|
||||
import textwrap
|
||||
|
||||
from cpl.utils.string import String
|
||||
from cpl_cli.templates.template_file_abc import TemplateFileABC
|
||||
|
||||
|
||||
@ -8,6 +9,7 @@ class StartupTemplate(TemplateFileABC):
|
||||
def __init__(self, name: str):
|
||||
TemplateFileABC.__init__(self)
|
||||
|
||||
name = String.convert_to_snake_case(name)
|
||||
self._name = 'startup.py'
|
||||
self._path = f'src/{name}_cli/'
|
||||
self._value = textwrap.dedent("""\
|
||||
|
Loading…
Reference in New Issue
Block a user