From 8a2bf40adb9a0ece54920401aa0e6c7f552e23c0 Mon Sep 17 00:00:00 2001 From: Eric Amodio Date: Tue, 19 Jun 2018 01:19:21 -0400 Subject: [PATCH] Updates launch & tasks with unified watch --- .vscode/launch.json | 18 ++++++++--- .vscode/tasks.json | 90 ++++++++++++++++++++++++++++++++++++++++++++++------- 2 files changed, 92 insertions(+), 16 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 203c0eb..16ab15e 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -7,21 +7,29 @@ "type": "extensionHost", "request": "launch", "runtimeExecutable": "${execPath}", - "args": ["--extensionDevelopmentPath=${workspaceRoot}" ], + "args": [ + "--extensionDevelopmentPath=${workspaceRoot}" + ], "stopOnEntry": false, "sourceMaps": true, - "outFiles": ["${workspaceRoot}/out/**/*.js"] + "outFiles": [ + "${workspaceRoot}/out/**/*.js" + ] }, { "name": "Watch & Launch GitLens", "type": "extensionHost", "request": "launch", "runtimeExecutable": "${execPath}", - "args": ["--extensionDevelopmentPath=${workspaceRoot}" ], + "args": [ + "--extensionDevelopmentPath=${workspaceRoot}" + ], "stopOnEntry": false, "sourceMaps": true, - "outFiles": ["${workspaceRoot}/out/**/*.js"], + "outFiles": [ + "${workspaceRoot}/out/**/*.js" + ], "preLaunchTask": "watch" } ] -} +} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json index aa82204..a13cde8 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -5,38 +5,35 @@ // ${fileDirname}: the current opened file's dirname // ${fileExtname}: the current opened file's extension // ${cwd}: the current working directory of the spawned process - // A task runner that calls a custom npm script that compiles the extension. { "version": "2.0.0", "presentation": { - "echo": true, + "echo": false, "reveal": "always", "focus": false, - "panel": "shared" + "panel": "dedicated", + "showReuseMessage": true }, "tasks": [ { - "label": "build", "type": "npm", "script": "build", + "group": "build", "problemMatcher": [ "$tsc", "$tslint5" ], - "group": "build" }, { - "label": "lint", "type": "npm", "script": "lint", + "group": "build", "problemMatcher": [ "$tslint5" - ], - "group": "build" + ] }, { - "label": "rebuild", "type": "npm", "script": "rebuild", "problemMatcher": [ @@ -46,17 +43,88 @@ "group": "build" }, { - "label": "watch", "type": "npm", "script": "watch", + "group": "build", "isBackground": true, "problemMatcher": [ "$tsc-watch" + ] + }, + { + "type": "npm", + "script": "watch-ui", + "group": "build", + "isBackground": true, + "problemMatcher": [ + { + "owner": "typescript", + "severity": "error", + "fileLocation": "relative", + "background": { + "activeOnStart": true, + "beginsPattern": { + "regexp": "webpack is watching the files..." + }, + "endsPattern": { + "regexp": "Built at\\:(.*)" + } + }, + "pattern": [ + { + "regexp": "ERROR in \\[at-loader\\] ([^:]*):(\\d+):(\\d+)", + "file": 1, + "line": 2, + "column": 3 + }, + { + "regexp": "TS(.*)", + "message": 1 + } + ] + } + ] + }, + { + "label": "watch", + "dependsOn": [ + "npm: watch-ui", + "npm: watch" ], "group": { "kind": "build", "isDefault": true - } + }, + "isBackground": true, + "problemMatcher": [ + "$tsc-watch", + { + "owner": "typescript", + "severity": "error", + "fileLocation": "relative", + "background": { + "activeOnStart": true, + "beginsPattern": { + "regexp": "webpack is watching the files..." + }, + "endsPattern": { + "regexp": "Built at\\:(.*)" + } + }, + "pattern": [ + { + "regexp": "ERROR in \\[at-loader\\] ([^:]*):(\\d+):(\\d+)", + "file": 1, + "line": 2, + "column": 3 + }, + { + "regexp": "TS(.*)", + "message": 1 + } + ] + } + ] } ] } \ No newline at end of file