Skip to content

Commit

Permalink
[debug-node] download vscode extensions only on postinstall
Browse files Browse the repository at this point in the history
Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
  • Loading branch information
akosyakov committed Nov 7, 2018
1 parent 9f48a8a commit a9cf7d8
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
1 change: 1 addition & 0 deletions packages/debug-nodejs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
download
9 changes: 5 additions & 4 deletions packages/debug-nodejs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion packages/debug-nodejs/scripts/download-adapters.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 }));
}
Original file line number Diff line number Diff line change
Expand Up @@ -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')
);
}

Expand Down Expand Up @@ -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')
);
}

Expand Down

0 comments on commit a9cf7d8

Please sign in to comment.