Plugin Command
This commit is contained in:
parent
8c3ac34fac
commit
74f0d05ca0
|
@ -280,7 +280,7 @@ class EmbarkController {
|
||||||
engine.startService("webServer");
|
engine.startService("webServer");
|
||||||
engine.startService("namingSystem");
|
engine.startService("namingSystem");
|
||||||
engine.startService("console");
|
engine.startService("console");
|
||||||
|
engine.startService("pluginCommand");
|
||||||
return callback();
|
return callback();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -70,7 +70,8 @@ class Engine {
|
||||||
"processManager": this.processManagerService,
|
"processManager": this.processManagerService,
|
||||||
"storage": this.storageService,
|
"storage": this.storageService,
|
||||||
"graph": this.graphService,
|
"graph": this.graphService,
|
||||||
"codeCoverage": this.codeCoverageService
|
"codeCoverage": this.codeCoverageService,
|
||||||
|
"pluginCommand": this.pluginCommandService
|
||||||
};
|
};
|
||||||
|
|
||||||
let service = services[serviceName];
|
let service = services[serviceName];
|
||||||
|
@ -130,6 +131,10 @@ class Engine {
|
||||||
this.servicesMonitor.startMonitor();
|
this.servicesMonitor.startMonitor();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pluginCommandService() {
|
||||||
|
this.registerModule('plugin_cmd');
|
||||||
|
}
|
||||||
|
|
||||||
namingSystem(_options) {
|
namingSystem(_options) {
|
||||||
this.registerModule('ens');
|
this.registerModule('ens');
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
class PluginCommand {
|
||||||
|
constructor(embark) {
|
||||||
|
console.log(embark);
|
||||||
|
//this.embark = embark;
|
||||||
|
//this.registerCommands();
|
||||||
|
}
|
||||||
|
registerCommands() {
|
||||||
|
const self = this;
|
||||||
|
self.embark.registerConsoleCommand((cmd, _options) => {
|
||||||
|
return {
|
||||||
|
match: () => cmd === 'webserver start',
|
||||||
|
process: (cb) => self.events.request('start-webserver', cb)
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = PluginCommand;
|
Loading…
Reference in New Issue