From 5e945b5c6ff23a50064819d6cb5711816119fb8b Mon Sep 17 00:00:00 2001 From: kamre Date: Thu, 8 Jul 2021 13:38:00 +0700 Subject: [PATCH] Minor improvements for VSCode: (#675) - chrome launch configuration for webapp added, - include `*.tsx` files in `tsconfig.json` so that jest tests inside `*.tsx` files don't show errors about not found jest functions --- .vscode/launch.json | 161 ++++++++++++++++++++------------------- webapp/src/tsconfig.json | 3 +- 2 files changed, 86 insertions(+), 78 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index a8015ded4..68455592b 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -1,79 +1,86 @@ { - // 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": "Go: Launch Server", - "type": "go", - "request": "launch", - "mode": "debug", - "program": "${workspaceFolder}/server/main", - "cwd": "${workspaceFolder}" - }, - { - "name": "Go: Launch Windows App", - "type": "go", - "request": "launch", - "mode": "debug", - "program": "${workspaceFolder}/win", - "cwd": "${workspaceFolder}/win/temp", - }, - { - "name": "Go: Launch Linux App", - "type": "go", - "request": "launch", - "mode": "debug", - "program": "${workspaceFolder}/linux", - "cwd": "${workspaceFolder}/linux/dist/focalboard-app", - }, - { - "name": "Go: Test Current File", - "type": "go", - "request": "launch", - "mode": "test", - "remotePath": "", - "port": 8888, - "host": "127.0.0.1", - "program": "${file}", - "env": {}, - "args": [], - "showLog": true - }, - { - "name": "Attach by Process ID", - "processId": "${command:PickProcess}", - "request": "attach", - "skipFiles": [ - "/**" - ], - "type": "pwa-node" - }, - { - "type": "node", - "request": "launch", - "name": "Jest: run all tests", - "program": "${workspaceRoot}/webapp/node_modules/jest/bin/jest.js", - "cwd": "${workspaceRoot}/webapp", - "args": [ - "--verbose", - ], - "console": "integratedTerminal", - "internalConsoleOptions": "neverOpen" - }, - { - "type": "node", - "request": "launch", - "name": "Jest: run current file", - "program": "${workspaceRoot}/webapp/node_modules/jest/bin/jest.js", - "cwd": "${workspaceRoot}/webapp", - "args": [ - "${fileBasename}", - "--verbose", - ], - "console": "integratedTerminal", - "internalConsoleOptions": "neverOpen" - }, - ] + // 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": "Go: Launch Server", + "type": "go", + "request": "launch", + "mode": "debug", + "program": "${workspaceFolder}/server/main", + "cwd": "${workspaceFolder}" + }, + { + "name": "Go: Launch Windows App", + "type": "go", + "request": "launch", + "mode": "debug", + "program": "${workspaceFolder}/win", + "cwd": "${workspaceFolder}/win/temp", + }, + { + "name": "Go: Launch Linux App", + "type": "go", + "request": "launch", + "mode": "debug", + "program": "${workspaceFolder}/linux", + "cwd": "${workspaceFolder}/linux/dist/focalboard-app", + }, + { + "name": "Go: Test Current File", + "type": "go", + "request": "launch", + "mode": "test", + "remotePath": "", + "port": 8888, + "host": "127.0.0.1", + "program": "${file}", + "env": {}, + "args": [], + "showLog": true + }, + { + "name": "Attach by Process ID", + "processId": "${command:PickProcess}", + "request": "attach", + "skipFiles": [ + "/**" + ], + "type": "pwa-node" + }, + { + "type": "node", + "request": "launch", + "name": "Jest: run all tests", + "program": "${workspaceRoot}/webapp/node_modules/jest/bin/jest.js", + "cwd": "${workspaceRoot}/webapp", + "args": [ + "--verbose", + ], + "console": "integratedTerminal", + "internalConsoleOptions": "neverOpen" + }, + { + "type": "node", + "request": "launch", + "name": "Jest: run current file", + "program": "${workspaceRoot}/webapp/node_modules/jest/bin/jest.js", + "cwd": "${workspaceRoot}/webapp", + "args": [ + "${fileBasename}", + "--verbose", + ], + "console": "integratedTerminal", + "internalConsoleOptions": "neverOpen" + }, + { + "type": "pwa-chrome", + "request": "launch", + "name": "Launch Chrome", + "url": "http://localhost:8000", + "webRoot": "${workspaceFolder}/webapp" + } + ] } diff --git a/webapp/src/tsconfig.json b/webapp/src/tsconfig.json index 74fcef635..54bb16f0b 100644 --- a/webapp/src/tsconfig.json +++ b/webapp/src/tsconfig.json @@ -10,6 +10,7 @@ } }, "include": [ - "./**/*.ts" + "./**/*.ts", + "./**/*.tsx" ] }