normalize package names for templates
This commit is contained in:
parent
73fc992b8f
commit
232bc5044b
|
@ -78,10 +78,11 @@ def new(
|
||||||
"""
|
"""
|
||||||
Initialize a project with boilerplate code.
|
Initialize a project with boilerplate code.
|
||||||
"""
|
"""
|
||||||
|
package_name = project_name.lower().replace('-', '_')
|
||||||
tmpl = templates()[template.name]
|
tmpl = templates()[template.name]
|
||||||
tmpl.values = {
|
tmpl.values = {
|
||||||
'PROJECT_NAME': project_name,
|
'PROJECT_NAME': project_name,
|
||||||
'PACKAGE_NAME': project_name,
|
'PACKAGE_NAME': package_name,
|
||||||
'DESCRIPTION': f"{project_name}: automatically generated by poetry-slam.",
|
'DESCRIPTION': f"{project_name}: automatically generated by poetry-slam.",
|
||||||
'AUTHOR_NAME': os.environ['USER']
|
'AUTHOR_NAME': os.environ['USER']
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user