From 0b55fb0f6ad5ced4c038d4184780ff8d1a057b06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nikola=20Dere=C5=BEi=C4=87?= Date: Fri, 5 Jan 2024 09:13:08 +0100 Subject: [PATCH] added vscode tasks & launch --- .vscode/launch.json | 36 ++++++++++++++++++++++++++++++++++++ .vscode/tasks.json | 30 ++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+) create mode 100644 .vscode/launch.json create mode 100644 .vscode/tasks.json diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..41839db --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,36 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "Debug", + "type": "node", + "request": "launch", + "envFile": "${workspaceFolder}/.env", + "runtimeArgs": [ + "run", // this is `run` from `npm run` + "dev" // this is `dev` from `npm run dev` + ], + "runtimeExecutable": "npm", + "cwd": "${workspaceFolder}/", + "localRoot": "${workspaceFolder}/", + "remoteRoot": "/app/", + "skipFiles": [ + "/**", + "./server//**", + "./script/**" + ], + "preLaunchTask": "start-mongo", + "postDebugTask": "terminate-mongo", + // "restart": true, + "outputCapture": "std", // this will capture the output of the process and show it in the debug console + "presentation": { + "hidden": false, + "group": "Debug", + "order": 0 + } + } + ] +} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..1b2136f --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,30 @@ +// Sass configuration +{ + // See https://go.microsoft.com/fwlink/?LinkId=733558 + // for the documentation about the tasks.json format + "version": "2.0.0", + "tasks": [ + { + "label": "start-mongo", + "type": "docker-compose", + "dockerCompose": { + "up": { + "detached": true, + "build": true, + }, + "files": [ + "${workspaceFolder}/docker-compose.yml" + ], + "isBackground": true, + "problemMatcher": "Terminal will be reused by tasks, press any key to close it" + } + }, + { + "label": "terminate-mongo", + "type": "docker-compose", + "dockerCompose": { + "down": {} + } + }, + ] +} \ No newline at end of file