diff --git a/hooks/post_gen_project.py b/hooks/post_gen_project.py index a00fd9b2..79612856 100644 --- a/hooks/post_gen_project.py +++ b/hooks/post_gen_project.py @@ -72,22 +72,12 @@ def remove_heroku_files(): file_names = [ 'Procfile', 'runtime.txt', + 'requirements.txt', ] for file_name in file_names: remove_file(os.path.join(PROJECT_DIR_PATH, file_name)) -def remove_paas_files(): - none_paas_files_left = True - - if '{{ cookiecutter.use_heroku }}'.lower() == 'n': - remove_heroku_files() - none_paas_files_left &= True - else: - none_paas_files_left &= False - - if none_paas_files_left: - remove_file(os.path.join(PROJECT_DIR_PATH, 'requirements.txt')) def remove_grunt_files(): @@ -250,7 +240,8 @@ def main(): if '{{ cookiecutter.use_docker }}'.lower() == 'n': remove_docker_files() - remove_paas_files() + if '{{ cookiecutter.use_heroku }}'.lower() == 'n': + remove_heroku_files() if '{{ cookiecutter.js_task_runner}}'.lower() == 'gulp': remove_grunt_files() diff --git a/{{cookiecutter.project_slug}}/requirements.txt b/{{cookiecutter.project_slug}}/requirements.txt index d1197135..c1b500c2 100644 --- a/{{cookiecutter.project_slug}}/requirements.txt +++ b/{{cookiecutter.project_slug}}/requirements.txt @@ -1,3 +1,3 @@ -# This file is here because many Platforms as a Service look for -# requirements.txt in the root directory of a project. +# This file is expected by Heroku. + -r requirements/production.txt