|
12 | 12 | const fs = require("fs"); |
13 | 13 | const cp = require("child_process"); |
14 | 14 | const path = require("path"); |
| 15 | + |
15 | 16 | if (!process.env.CPPTOOLS_DEV && fs.existsSync('./node_modules')) { |
16 | | - console.log("Skipping npm install since it appears to have been executed already."); |
| 17 | + console.warn("WARNING: Skipping npm install since it appears to have been executed already."); |
17 | 18 | } else { |
18 | 19 | console.log(">> npm install"); |
19 | 20 | cp.execSync("npm install", { stdio: [0, 1, 2] }); |
20 | 21 | } |
21 | 22 |
|
| 23 | +// Compile the TypeScript code |
| 24 | +console.log(">> tsc -p ./"); |
| 25 | +cp.execSync("tsc -p ./", {stdio:[0, 1, 2]}); |
| 26 | + |
22 | 27 | // If the required debugger file doesn't exist, make sure it is copied. |
23 | | -if (process.env.CPPTOOLS_DEV || !fs.existsSync('./debugAdapters/bin/cpptools.ad7Engine.json')) { |
24 | | - const outDir = './out/src/Support/' |
25 | | - const copyDebuggerDependenciesJSFile = path.join(outDir, 'copyDebuggerDependencies.js'); |
26 | | - if (!fs.existsSync('./out/src/Support/copyDebuggerDependencies.js')) |
27 | | - { |
28 | | - console.log(">> tsc ./src/Support/copyDebuggerDependencies.ts -- outDir" + outDir); |
29 | | - cp.execSync("tsc ./src/Support/copyDebuggerDependencies.ts --outDir " + outDir, { stdio: [0, 1, 2] }); |
30 | | - } |
| 28 | +if (process.env.CPPTOOLS_DEV || !fs.existsSync('./debugAdapters/bin/cppdbg.ad7Engine.json')) { |
| 29 | + const copyDebuggerDependenciesJSFile = './out/src/Support/copyDebuggerDependencies.js'; |
31 | 30 |
|
32 | 31 | // Required for nightly builds. Nightly builds do not enable CPPTOOLS_DEV. |
33 | 32 | console.log(">> node " + copyDebuggerDependenciesJSFile); |
|
0 commit comments