From 3adfbae54af28326be0dea9d7c13006a13981e8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Genevi=C3=A8ve=20Bastien?= Date: Thu, 3 Nov 2022 11:53:09 -0400 Subject: [PATCH] Add .vscode launch examples and settings The launch.json.example can be copied to launch.json to provide a few debugger-ready launch configurations for the server, tasks, unit tests and browsers. --- .vscode/launch.json.example | 77 +++++++++++++++++++++++++++++++++++++ .vscode/settings.json | 8 ++++ package.json | 3 +- 3 files changed, 86 insertions(+), 2 deletions(-) create mode 100644 .vscode/launch.json.example create mode 100644 .vscode/settings.json diff --git a/.vscode/launch.json.example b/.vscode/launch.json.example new file mode 100644 index 000000000..5d18932a6 --- /dev/null +++ b/.vscode/launch.json.example @@ -0,0 +1,77 @@ +{ + // 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": [ + { + "type": "firefox", + "request": "launch", + "name": "Start client in firefox", + // "firefoxExecutable": "usr/bin/firefox-bin", + "reAttach": true, + "webRoot": "${workspaceRoot}", + "url": "http://localhost:8080", + "pathMappings": [ + { + "url": "webpack:///src", + "path": "${workspaceFolder}/transition-app/frontend/src" + } + ] + }, + { + "type": "chrome", + "request": "launch", + "name": "Start client in Chrome", + "port": 9222, + // "runtimeExecutable": "/usr/bin/chromium-browser", + "webRoot": "${workspaceRoot}", + "url": "http://localhost:8080" + }, + { + "type": "node", + "request": "launch", + "name": "Run server with yarn", + "skipFiles": [ + "/**" + ], + "runtimeExecutable": "yarn", + "runtimeArgs": [ + "start" + ], + "cwd": "${workspaceRoot}" + }, + { + "type": "node", + "request": "launch", + "name": "Debug a specific task", + "skipFiles": [ + "/**" + ], + "runtimeExecutable": "yarn", + "runtimeArgs": [ + "babel-node", + "--max-old-space-size=4096", + "packages/transition-backend/lib/scripts/cache/recreateCache.task.js" + ], + "cwd": "${workspaceRoot}" + }, + { + "type": "node", + "request": "launch", + "name": "Jest Current File", + "program": "${workspaceFolder}/node_modules/.bin/jest", + "args": [ + "${fileBasenameNoExtension}", + "--config", + "jest.config.js" + ], + "console": "integratedTerminal", + "internalConsoleOptions": "neverOpen", + "windows": { + "program": "${workspaceFolder}/node_modules/jest/bin/jest", + }, + "cwd": "${workspaceRoot}/packages/chaire-lib-common" + } + ] +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 000000000..0aa82af37 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,8 @@ +{ + "editor.codeActionsOnSave": { + "source.fixAll.eslint": true + }, + "editor.tabSize": 4, + "editor.insertSpaces": true, + "editor.detectIndentation": false +} \ No newline at end of file diff --git a/package.json b/package.json index 411f40d52..a52581717 100644 --- a/package.json +++ b/package.json @@ -31,8 +31,7 @@ "test:ui": "yarn workspaces run test:ui", "lint": "yarn workspaces run lint", "format": "yarn workspaces run format", - "list-tasks": "yarn workspace transition-legacy run list-tasks", - "table-schema": "yarn workspace transition-legacy run table-schema", + "list-tasks": "yarn workspace transition-backend run list-tasks", "generate-migration": "knex migrate:make" }, "dependencies": {},