Merge branch 'master' of github.com:Eugeny/terminus

This commit is contained in:
Eugene Pankov committed 2017-04-30 13:42:32 +02:00
commit cb6e9243c1
16 files changed
+123 -75

No files matched your search

+6 -3
View File
@@ -62,10 +62,11 @@ export async function findPlugins (): Promise<IPluginEntry[]> {
return foundPlugins
}
export function loadPlugins (foundPlugins: IPluginEntry[], progress: ProgressCallback): any[] {
export async function loadPlugins (foundPlugins: IPluginEntry[], progress: ProgressCallback): Promise<any[]> {
let plugins: any[] = []
progress(0, 1)
foundPlugins.forEach((foundPlugin, index) => {
let index = 0
for (let foundPlugin of foundPlugins) {
console.info(`Loading ${foundPlugin.name}: ${(<any>global).require.resolve(foundPlugin.path)}`)
progress(index, foundPlugins.length)
try {
@@ -74,7 +75,9 @@ export function loadPlugins (foundPlugins: IPluginEntry[], progress: ProgressCal
} catch (error) {
console.error(`Could not load ${foundPlugin.name}:`, error)
}
})
await delay(1)
index++
}
progress(1, 1)
return plugins
}