export bootstrap from bootstrap-amd

This commit is contained in:
Joao Moreno 2016-02-12 12:04:03 +01:00
parent 27c4aca1c5
commit c1ef29da9b
2 changed files with 10 additions and 5 deletions

12
src/bootstrap-amd.js vendored
View file

@ -33,7 +33,13 @@ if (nlsConfig.pseudo) {
});
}
var entrypoint = process.env['AMD_ENTRYPOINT'];
if (entrypoint) {
var bootstrap = exports.bootstrap = function (entrypoint) {
loader([entrypoint], function () { }, function (err) { console.error(err); });
}
};
if (require.main === module) {
var entrypoint = process.env['AMD_ENTRYPOINT'];
if (entrypoint) {
bootstrap(entrypoint);
}
}

View file

@ -76,6 +76,5 @@ process.env['VSCODE_NLS_CONFIG'] = JSON.stringify(nlsConfig);
// Load our code once ready
app.once('ready', function() {
process.env['AMD_ENTRYPOINT'] = 'vs/workbench/electron-main/main';
require('./bootstrap-amd');
require('./bootstrap-amd').bootstrap('vs/workbench/electron-main/main');
});