Import modulemanager, add modules path to config, requires core rebuild
This commit is contained in:
parent
e01567bd6a
commit
728aab8e95
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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 }
|
||||
]
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue