refactor pluginPath

This commit is contained in:
Iuri Matias 2018-06-18 11:27:29 -04:00
parent e0e3887aaf
commit b34ddf32cf
1 changed files with 2 additions and 2 deletions

View File

@ -54,7 +54,7 @@ Plugins.prototype.createPlugin = function(pluginName, pluginConfig) {
}; };
Plugins.prototype.loadInternalPlugin = function(pluginName, pluginConfig) { Plugins.prototype.loadInternalPlugin = function(pluginName, pluginConfig) {
var pluginPath = utils.joinPath('../modules/', pluginName, 'index.js'); var pluginPath = fs.embarkPath('lib/modules/' + pluginName);
var plugin = require(pluginPath); var plugin = require(pluginPath);
var pluginWrapper = new Plugin({ var pluginWrapper = new Plugin({
@ -62,7 +62,7 @@ Plugins.prototype.loadInternalPlugin = function(pluginName, pluginConfig) {
pluginModule: plugin, pluginModule: plugin,
pluginConfig: pluginConfig || {}, pluginConfig: pluginConfig || {},
logger: this.logger, logger: this.logger,
pluginPath: fs.embarkPath('lib/modules/' + pluginName), pluginPath: pluginPath,
interceptLogs: this.interceptLogs, interceptLogs: this.interceptLogs,
events: this.events, events: this.events,
config: this.config, config: this.config,