From 50efdea9d66c3168218c8291cf60a27d82a6aa6d Mon Sep 17 00:00:00 2001 From: Andrew Eisenberg Date: Fri, 9 Oct 2020 09:00:07 -0700 Subject: [PATCH] Remove build before launch in launch.json And update contributing with new instructions. --- .vscode/launch.json | 3 --- CONTRIBUTING.md | 11 ++++++++++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index a6ceb4fc2..118a81295 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -15,7 +15,6 @@ "outFiles": [ "${workspaceRoot}/extensions/ql-vscode/out/**/*.js", ], - "preLaunchTask": "Build", "env": { // uncomment to allow debugging the language server Java process from a remote java debugger // "DEBUG_LANGUAGE_SERVER": "true" @@ -62,7 +61,6 @@ "outFiles": [ "${workspaceRoot}/extensions/ql-vscode/out/**/*.js", ], - "preLaunchTask": "Build" }, { "name": "Launch Integration Tests - Minimal Workspace (vscode-codeql)", @@ -79,7 +77,6 @@ "outFiles": [ "${workspaceRoot}/extensions/ql-vscode/out/**/*.js", ], - "preLaunchTask": "Build" } ] } diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6089bf66a..780c66ac9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -46,9 +46,18 @@ From the command line, go to the directory `extensions/ql-vscode` and run ```shell npm run build +npm run watch ``` -Alternatively, you can build the extension within VS Code via `Terminal > Run Build Task...` (or `Ctrl+Shift+B` with the default key bindings). +Alternatively, you can build the extension within VS Code via `Terminal > Run Build Task...` (or `Ctrl+Shift+B` with the default key bindings). And you can run the watch command via `Terminal > Run Task` and then select `npm watch` from the menu. + +Before running any of the launch commands, be sure to have run the `build` command to ensure that the JavaScript is compiled and the resources are copied to the proper location. + +We recommend that you keep`npm run watch` running in the backgound and you only need to re-run `npm run build` in the following situations: + +1. on first checkout +2. whenever any of the non-TypeScript resources have changed +3. on any change to files included in the webview ### Installing the extension