Skip to content

Commit c1ef29d

Browse files
committed
export bootstrap from bootstrap-amd
1 parent 27c4aca commit c1ef29d

2 files changed

Lines changed: 10 additions & 5 deletions

File tree

src/bootstrap-amd.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,13 @@ if (nlsConfig.pseudo) {
3333
});
3434
}
3535

36-
var entrypoint = process.env['AMD_ENTRYPOINT'];
37-
if (entrypoint) {
36+
var bootstrap = exports.bootstrap = function (entrypoint) {
3837
loader([entrypoint], function () { }, function (err) { console.error(err); });
39-
}
38+
};
39+
40+
if (require.main === module) {
41+
var entrypoint = process.env['AMD_ENTRYPOINT'];
42+
if (entrypoint) {
43+
bootstrap(entrypoint);
44+
}
45+
}

src/main.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,5 @@ process.env['VSCODE_NLS_CONFIG'] = JSON.stringify(nlsConfig);
7676

7777
// Load our code once ready
7878
app.once('ready', function() {
79-
process.env['AMD_ENTRYPOINT'] = 'vs/workbench/electron-main/main';
80-
require('./bootstrap-amd');
79+
require('./bootstrap-amd').bootstrap('vs/workbench/electron-main/main');
8180
});

0 commit comments

Comments
 (0)