From 3f24b63a891aaa2cb86a799edf93f8730f8c0b3d Mon Sep 17 00:00:00 2001 From: Narendranath Gogineni Date: Thu, 12 Sep 2024 10:36:01 +0530 Subject: [PATCH] Cleanup build containing map files after debugging is done --- .vscode/launch.json | 3 ++- .vscode/tasks.json | 20 +++++++++++++++++++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 101283e9..12004c54 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -35,7 +35,8 @@ "skipFiles": ["/**"], "preLaunchTask": "npx tsc", "console": "integratedTerminal", - "internalConsoleOptions": "neverOpen" + "internalConsoleOptions": "neverOpen", + "postDebugTask": "cleanup build" } ] } diff --git a/.vscode/tasks.json b/.vscode/tasks.json index ab519036..bd050a83 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -7,12 +7,30 @@ "type": "shell", "label": "npx tsc", "command": "npx", - "args": ["tsc"], + "args": [ + "tsc", + "--sourcemap", + "true", + "--outDir", + "${workspaceFolder}/build" + ], "problemMatcher": ["$tsc"], "group": { "kind": "build", "isDefault": true } + }, + { + "type": "shell", + "label": "cleanup build", + "command": "rm", + "args": ["-rf", "${workspaceFolder}/build"], + "problemMatcher": [], + "group": "build", + "presentation": { + "reveal": "always", + "panel": "new" + } } ] }