share TypeScipt node_module amongst extensions

This commit is contained in:
Martin Aeschlimann
2016-11-23 16:09:58 +01:00
parent 38c5406ba4
commit 1c4e72aa68
13 changed files with 120 additions and 64320 deletions

View File

@@ -6,6 +6,19 @@
const cp = require('child_process');
const npm = process.platform === 'win32' ? 'npm.cmd' : 'npm';
function npmInstall(location) {
const result = cp.spawnSync(npm, ['install'], {
cwd: location ,
stdio: 'inherit'
});
if (result.error || result.status !== 0) {
process.exit(1);
}
}
npmInstall('extensions'); // node modules shared by all extensions
const extensions = [
'vscode-api-tests',
'vscode-colorize-tests',
@@ -20,13 +33,4 @@ const extensions = [
'html'
];
extensions.forEach(extension => {
const result = cp.spawnSync(npm, ['install'], {
cwd: `extensions/${extension}`,
stdio: 'inherit'
});
if (result.error || result.status !== 0) {
process.exit(1);
}
});
extensions.forEach(extension => npmInstall(`extensions/${extension}`));