Skip to content

Commit

Permalink
feat: Add precommit option and cleanup hook
Browse files Browse the repository at this point in the history
  • Loading branch information
pawamoy committed Mar 12, 2021
1 parent 4d3922d commit ba8cfd4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions copier.yml
Expand Up @@ -122,3 +122,8 @@ python_package_command_line_name:
type: str
help: Your CLI name if any (for use in the shell)
default: "[[ project_name|lower|replace('_', '-')|replace(' ', '-') ]]"

use_precommit:
type: bool
help: Do you want to use pre-commit?
default: no
7 changes: 7 additions & 0 deletions project/scripts/post_generation.py.jinja
Expand Up @@ -29,12 +29,19 @@ def clean_up_providers():
rmdir(".github")


def clean_up_precommit():
use_precommit = [[ use_precommit ]]
if not use_precommit:
rm(".pre-commit-config.yaml")


def delete_myself():
rm(__file__)


if __name__ == "__main__":
clean_up_providers()
clean_up_precommit()
delete_myself()

print("Project sucessfully generated!")
Expand Down

0 comments on commit ba8cfd4

Please sign in to comment.