diff --git a/.vscode/launch.json b/.vscode/launch.json index 4b528310..7c0a75eb 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -5,7 +5,21 @@ "version": "0.2.0", "configurations": [ { - "name": "Python: FastAPI", + "name": "Frontend", + "request": "launch", + "runtimeArgs": [ + "run", + "start", + ], + "runtimeExecutable": "npm", + "skipFiles": [ + "/**" + ], + "type": "node", + "cwd": "${workspaceFolder}/frontend" + }, + { + "name": "Backend", "type": "python", "request": "launch", "module": "uvicorn", @@ -17,5 +31,13 @@ "justMyCode": true, "cwd": "${workspaceFolder}/backend" } - ] + ], + "compounds": [ + { + "name": "Frontend & Backend", + "configurations": ["Frontend", "Backend"], + // "preLaunchTask": "${defaultBuildTask}", + "stopAll": true + } + ] } \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 00000000..f2cdbac9 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,58 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "type": "npm", + "script": "install", + "path": "frontend", + "group": "clean", + "problemMatcher": [], + "label": "npm: install - frontend", + "detail": "install dependencies from package" + }, + { + "type": "npm", + "script": "build", + "path": "frontend", + "group": { + "kind": "build", + "isDefault": true + }, + "problemMatcher": [], + "label": "npm: build - frontend", + "detail": "react-scripts build" + }, + { + "type": "npm", + "script": "test", + "path": "frontend", + "group": { + "kind": "test", + "isDefault": true + }, + "problemMatcher": [], + "label": "npm: test - frontend", + "detail": "react-scripts test" + }, + { + "type": "shell", + "command": "source", + "args": ["venv/bin/activate"], + "label": "Activate virtual environment", + "options": { + "cwd": "${workspaceFolder}/backend" + }, + }, + { + "type": "shell", + "command": "pytest", + "args": ["-v"], + "label": "Run python tests", + "options": { + "cwd": "${workspaceFolder}/backend" + }, + "dependsOrder": "sequence", + "dependsOn": [ "Activate virtual environment" ] + } + ] +} \ No newline at end of file