diff --git a/packages/debug-nodejs/.gitignore b/packages/debug-nodejs/.gitignore new file mode 100644 index 0000000000000..d3a4c58190359 --- /dev/null +++ b/packages/debug-nodejs/.gitignore @@ -0,0 +1 @@ +download diff --git a/packages/debug-nodejs/package.json b/packages/debug-nodejs/package.json index 4ecdbecdcc204..3b518ee1d70d8 100644 --- a/packages/debug-nodejs/package.json +++ b/packages/debug-nodejs/package.json @@ -30,16 +30,17 @@ "homepage": "https://github.com/theia-ide/theia", "files": [ "lib", - "src" + "src", + "scripts" ], "scripts": { + "postinstall": "node ./scripts/download-adapters.js", "prepare": "yarn run clean && yarn run build", "clean": "theiaext clean", - "build": "yarn download && theiaext build", + "build": "theiaext build", "watch": "theiaext watch", "test": "theiaext test", - "docs": "theiaext docs", - "download": "node ./scripts/download-adapters.js" + "docs": "theiaext docs" }, "devDependencies": { "@theia/ext-scripts": "^0.3.16" diff --git a/packages/debug-nodejs/scripts/download-adapters.js b/packages/debug-nodejs/scripts/download-adapters.js index 45775b0517c6e..6f2941c22a670 100644 --- a/packages/debug-nodejs/scripts/download-adapters.js +++ b/packages/debug-nodejs/scripts/download-adapters.js @@ -21,6 +21,6 @@ const path = require('path'); const pck = require('../package.json'); for (const name in pck.adapters) { const url = pck.adapters[name]; - const targetPath = path.join(__dirname, '../lib', name); + const targetPath = path.join(__dirname, '../download', name); request(url).pipe(unzip.Extract({ path: targetPath })); } diff --git a/packages/debug-nodejs/src/node/node-debug-adapter-contribution.ts b/packages/debug-nodejs/src/node/node-debug-adapter-contribution.ts index b6058aaecb893..e7334958a4b86 100644 --- a/packages/debug-nodejs/src/node/node-debug-adapter-contribution.ts +++ b/packages/debug-nodejs/src/node/node-debug-adapter-contribution.ts @@ -31,7 +31,7 @@ export class NodeDebugAdapterContribution extends AbstractVSCodeDebugAdapterCont constructor() { super( 'node', - path.join(__dirname, '../../lib/node-debug/extension') + path.join(__dirname, '../../download/node-debug/extension') ); } @@ -98,7 +98,7 @@ export class Node2DebugAdapterContribution extends AbstractVSCodeDebugAdapterCon constructor() { super( 'node2', - path.join(__dirname, '../../lib/node-debug2/extension') + path.join(__dirname, '../../download/node-debug2/extension') ); }