Merge pull request #2159 from thornbill/plugin-manager-improvements
Plugin manager improvements
This commit is contained in:
commit
dd080a8aef
2 changed files with 4 additions and 8 deletions
|
@ -77,7 +77,7 @@ import { playbackManager } from './playback/playbackmanager';
|
||||||
let pluginInstance = await window[pluginSpec];
|
let pluginInstance = await window[pluginSpec];
|
||||||
|
|
||||||
if (typeof pluginInstance === 'function') {
|
if (typeof pluginInstance === 'function') {
|
||||||
pluginInstance = await pluginInstance();
|
pluginInstance = await new pluginInstance();
|
||||||
}
|
}
|
||||||
|
|
||||||
// init plugin and pass basic dependencies
|
// init plugin and pass basic dependencies
|
||||||
|
|
|
@ -143,13 +143,9 @@ function loadPlugins() {
|
||||||
list = list.concat(window.NativeShell.getPlugins());
|
list = list.concat(window.NativeShell.getPlugins());
|
||||||
}
|
}
|
||||||
|
|
||||||
Promise.all(list.map((plugin) => {
|
Promise.all(list.map(plugin => pluginManager.loadPlugin(plugin)))
|
||||||
return pluginManager.loadPlugin(plugin);
|
.then(() => console.debug('finished loading plugins'))
|
||||||
}))
|
.catch(e => console.warn('failed loading plugins', e))
|
||||||
.then(function () {
|
|
||||||
console.debug('finished loading plugins');
|
|
||||||
})
|
|
||||||
.catch(() => console.debug('failed loading plugins'))
|
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
console.groupEnd('loading installed plugins');
|
console.groupEnd('loading installed plugins');
|
||||||
packageManager.init();
|
packageManager.init();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue