mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-25 04:36:23 +00:00
share TypeScipt node_module amongst extensions
This commit is contained in:
@@ -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}`));
|
||||
Reference in New Issue
Block a user