Import modulemanager, add modules path to config, requires core rebuild

This commit is contained in:
Jiiks 2018-02-14 00:24:04 +02:00
parent e01567bd6a
commit 728aab8e95
2 changed files with 5 additions and 2 deletions

View File

@ -9,6 +9,7 @@
*/
import { ClientLogger as Logger } from 'common';
import ExtModuleManager from './extmodulemanager';
import PluginManager from './pluginmanager';
import ThemeManager from './thememanager';
import Events from './events';
@ -101,7 +102,7 @@ export default class PluginApi {
get require() { return this.import }
import(m) {
const module = PluginManager.findPlugin(m);
const module = ExtModuleManager.findModule(m);
if (module && module.__require) return module.__require;
return null;
}

View File

@ -24,6 +24,7 @@ const __DEV = {
const __dataPath = path.resolve(__dirname, '..', '..', 'tests', 'data');
const __pluginPath = path.resolve(__dirname, '..', '..', 'tests', 'plugins');
const __themePath = path.resolve(__dirname, '..', '..', 'tests', 'themes');
const __modulePath = path.resolve(__dirname, '..', '..', 'tests', 'modules');
const { Utils, FileUtils, BDIpc, Config, WindowUtils, CSSEditor } = require('./modules');
const { BrowserWindow, dialog } = require('electron');
@ -36,7 +37,8 @@ const dummyArgs = {
{ 'id': 'base', 'path': 'basePath' },
{ 'id': 'data', 'path': __dataPath },
{ 'id': 'plugins', 'path': __pluginPath },
{ 'id': 'themes', 'path': __themePath }
{ 'id': 'themes', 'path': __themePath },
{ 'id': 'modules', 'path': __modulePath }
]
};