mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-08-09 06:24:52 +03:00
Update post generation hook
- Remove Docker + Gulp task runner incompatible warning - Remove node dockerfile if no JS Task runner
This commit is contained in:
parent
3167e4bfda
commit
fb93386888
|
@ -221,6 +221,9 @@ def remove_celery_compose_dirs():
|
|||
shutil.rmtree(os.path.join("compose", "local", "django", "celery"))
|
||||
shutil.rmtree(os.path.join("compose", "production", "django", "celery"))
|
||||
|
||||
def remove_node_dockerfile():
|
||||
shutil.rmtree(os.path.join("compose", "local", "node"))
|
||||
|
||||
|
||||
def main():
|
||||
postgres_user = generate_postgres_user(debug="{{ cookiecutter.debug }}".lower() == "y")
|
||||
|
@ -261,21 +264,7 @@ def main():
|
|||
if "{{ cookiecutter.js_task_runner}}".lower() == "none":
|
||||
remove_gulp_files()
|
||||
remove_packagejson_file()
|
||||
if (
|
||||
"{{ cookiecutter.js_task_runner }}".lower() != "none"
|
||||
and "{{ cookiecutter.use_docker }}".lower() == "y"
|
||||
):
|
||||
print(
|
||||
WARNING
|
||||
+ "Docker and {} JS task runner ".format(
|
||||
"{{ cookiecutter.js_task_runner }}".lower().capitalize()
|
||||
)
|
||||
+ "working together not supported yet. "
|
||||
"You can continue using the generated project like you "
|
||||
"normally would, however you would need to add a JS "
|
||||
"task runner service to your Docker Compose configuration "
|
||||
"manually." + TERMINATOR
|
||||
)
|
||||
remove_node_dockerfile()
|
||||
|
||||
if "{{ cookiecutter.use_celery }}".lower() == "n":
|
||||
remove_celery_app()
|
||||
|
|
Loading…
Reference in New Issue
Block a user