Skip to content

Commit d5fb6a1

Browse files
authored
faster launch times for extension debugging (#1555)
* add a way to speed up subsequent launches of the extension. * A cleaner way to exit * update package.json * read the environment variable to short-circuit the node_modules check.
1 parent e70f625 commit d5fb6a1

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

Extension/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1047,7 +1047,7 @@
10471047
"test": "gulp allTests",
10481048
"tslint": "gulp tslint",
10491049
"unitTests": "gulp unitTests",
1050-
"vscode:prepublish": "npm install && tsc -p ./ && node ./out/src/Debugger/copyScript.js",
1050+
"vscode:prepublish": "node ./src/Support/update.js && npm install && tsc -p ./ && node ./out/src/Support/copyDebuggerDependencies.js",
10511051
"watch": "tsc -watch -p ./"
10521052
},
10531053
"devDependencies": {

Extension/src/Support/update.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/* --------------------------------------------------------------------------------------------
2+
* Copyright (c) Microsoft Corporation. All Rights Reserved.
3+
* See 'LICENSE' in the project root for license information.
4+
* ------------------------------------------------------------------------------------------ */
5+
'use strict';
6+
7+
/**
8+
* This file is used during local debugging of the extension and should not be referenced by any
9+
* other source files.
10+
*/
11+
12+
const fs = require("fs");
13+
if (!process.env.CPPTOOLS_DEV && fs.existsSync('./node_modules')) {
14+
console.log("Skipping prepublish steps since they appear to have been executed already.");
15+
process.exit(1);
16+
}

0 commit comments

Comments
 (0)