From bfcdcce11d7f5eebb8407117c6fa57e513fd776d Mon Sep 17 00:00:00 2001 From: Profitroll <47523801+profitrollgame@users.noreply.github.com> Date: Thu, 26 Jan 2023 10:58:20 +0100 Subject: [PATCH] Added cleanup task --- .gitignore | 3 +-- .vscode/tasks.json | 13 +++++++++++++ .vscode/tasks/cleanup.bat | 2 ++ 3 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 .vscode/tasks.json create mode 100644 .vscode/tasks/cleanup.bat diff --git a/.gitignore b/.gitignore index 1c6d1de..453ac27 100644 --- a/.gitignore +++ b/.gitignore @@ -153,7 +153,7 @@ cython_debug/ #.idea/ # ---> VisualStudioCode -.vscode/* +.vscode/sftp.json !.vscode/settings.json !.vscode/launch.json !.vscode/extensions.json @@ -166,4 +166,3 @@ cython_debug/ *.vsix # Project -cleanup.* \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..ca64895 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,13 @@ +{ + // See https://go.microsoft.com/fwlink/?LinkId=733558 + // for the documentation about the tasks.json format + "version": "2.0.0", + "tasks": [ + { + "label": "Clean up", + "type": "shell", + "command": ".\\.vscode\\tasks\\cleanup.bat", + "problemMatcher": [] + } + ] +} \ No newline at end of file diff --git a/.vscode/tasks/cleanup.bat b/.vscode/tasks/cleanup.bat new file mode 100644 index 0000000..bbc1839 --- /dev/null +++ b/.vscode/tasks/cleanup.bat @@ -0,0 +1,2 @@ +python -Bc "import pathlib; [p.unlink() for p in pathlib.Path('.').rglob('*.py[co]')]" +python -Bc "import pathlib; [p.rmdir() for p in pathlib.Path('.').rglob('__pycache__')]" \ No newline at end of file