mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-08-10 23:14:52 +03:00
Remove project.css
when a bundler is used (#5874)
* Update post_gen_project.py Add remove_project_css function to remove static/css/project.css in case a bundler is used. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
605af631aa
commit
5086c4af65
|
@ -106,6 +106,12 @@ def remove_vendors_js():
|
|||
vendors_js_path.unlink()
|
||||
|
||||
|
||||
def remove_project_css():
|
||||
project_css_path = Path("{{ cookiecutter.project_slug }}", "static", "css", "project.css")
|
||||
if project_css_path.exists():
|
||||
project_css_path.unlink()
|
||||
|
||||
|
||||
def remove_packagejson_file():
|
||||
file_names = ["package.json"]
|
||||
for file_name in file_names:
|
||||
|
@ -462,6 +468,7 @@ def main():
|
|||
if "{{ cookiecutter.use_docker }}".lower() == "y":
|
||||
remove_node_dockerfile()
|
||||
else:
|
||||
remove_project_css()
|
||||
handle_js_runner(
|
||||
"{{ cookiecutter.frontend_pipeline }}",
|
||||
use_docker=("{{ cookiecutter.use_docker }}".lower() == "y"),
|
||||
|
|
Loading…
Reference in New Issue
Block a user