From 26d01adcf7c806faa5d28448db5ad2f7b823c939 Mon Sep 17 00:00:00 2001 From: Erich Gamma Date: Mon, 19 Oct 2015 14:48:19 +0200 Subject: [PATCH] Update to latest vscode develpment setup --- .vscode/launch.json | 7 +++---- .vscode/tasks.json | 20 +++++++++++--------- package.json | 9 +++++---- tsconfig.json | 2 +- 4 files changed, 20 insertions(+), 18 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index d9d1b73dc..38cae16d4 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -6,12 +6,11 @@ "type": "extensionHost", // path to VSCode executable "runtimeExecutable": "${execPath}", - // force VSCode to create a new window and pass this project as an additonal plugin location - // add workspace path to %GOPATH% so that there is some meaningful contents - "args": [ "--new-window", "--extensionDevelopmentPath=${workspaceRoot}" ], + "args": [ "--extensionDevelopmentPath=${workspaceRoot}" ], "stopOnEntry": false, "sourceMaps": true, - "outDir": "out" + "outDir": "out", + "preLaunchTask": "npm" }, { "name": "debug-debugger", diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 4710171e2..abc2da577 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -11,19 +11,21 @@ { "version": "0.1.0", - // The command is tsc. Assumes that tsc 1.5.x or higher has been installed using npm install -g typescript - "command": "node_modules/.bin/tsc", + // we want to run npm + "command": "npm", - // The command is a shell script + // the command is a shell script "isShellCommand": true, - // Show the output window only if unrecognized errors occur. + // show the output window only if unrecognized errors occur. "showOutput": "silent", - // args is the HelloWorld program to compile. - "args": ["-w"], + // we run the custom script "compile" as defined in package.json + "args": ["run", "compile"], - // use the standard tsc problem matcher to find compile problems - // in the output. - "problemMatcher": "$tsc" + // The tsc compiler is started in watching mode + "isWatching": true, + + // use the standard tsc in watch mode problem matcher to find compile problems in the output. + "problemMatcher": "$tsc-watch" } \ No newline at end of file diff --git a/package.json b/package.json index 18d7bd142..8841fa9de 100644 --- a/package.json +++ b/package.json @@ -4,15 +4,16 @@ "publisher": "lukehoban", "description": "Go support for Visual Studio Code", "author": { - "name": "Microsoft Corporation" + "name": "Microsoft Corporation - Development Labs" }, "private": true, "repository": { "type": "git", - "url": "https://monacotools.visualstudio.com/DefaultCollection/Monaco/_git/go-code" + "url": "https://github.com/Microsoft/vscode-go.git" }, "scripts": { - "prepublish": "tsc" + "vscode:prepublish": "node ./node_modules/vscode/bin/compile", + "compile": "node ./node_modules/vscode/bin/compile -watch -p ./" }, "extensionDependencies": [ "vscode.go" @@ -21,7 +22,7 @@ "json-rpc2": "^1.0.2" }, "devDependencies": { - "typescript": "^1.6.2" + "vscode": "*" }, "engines": { "vscode": "*" diff --git a/tsconfig.json b/tsconfig.json index 97865230d..166abf814 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -6,6 +6,6 @@ "target": "es5" }, "exclude": [ - "node_modules" + "node_modules" ] } \ No newline at end of file