mirror of https://github.com/embarklabs/embark.git
fix console cmds api
This commit is contained in:
parent
b29e865cd6
commit
411ed41c84
|
@ -155,12 +155,6 @@ Plugin.prototype.addProviderInit = function(providerType, code, initCondition) {
|
|||
this.pluginTypes.push('initCode');
|
||||
};
|
||||
|
||||
Plugin.prototype.runCommands = function(cmd, options) {
|
||||
return this.console.map(function(cb) {
|
||||
return cb.call(this, cmd, options);
|
||||
}).join("\n");
|
||||
};
|
||||
|
||||
Plugin.prototype.runFilePipeline = function() {
|
||||
var self = this;
|
||||
|
||||
|
|
|
@ -55,10 +55,10 @@ class Console {
|
|||
|
||||
executeCmd(cmd, callback) {
|
||||
let plugin, pluginOutput;
|
||||
let plugins = this.plugins.getPluginsFor('console');
|
||||
for (let i = 0; i < plugins.length; i++) {
|
||||
plugin = plugins[i];
|
||||
pluginOutput = plugin.runCommands(cmd, {});
|
||||
|
||||
var pluginCmds = this.plugins.getPluginsProperty('console', 'console');
|
||||
for (let pluginCmd of pluginCmds) {
|
||||
let pluginOutput = pluginCmd.call(this, cmd, {});
|
||||
if (pluginOutput !== false && pluginOutput !== 'false') return callback(pluginOutput);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue