mirror of
https://github.com/embarklabs/embark.git
synced 2025-01-11 14:24:24 +00:00
Adding profile command
This commit is contained in:
parent
90e1476888
commit
7268a419c1
@ -3,6 +3,7 @@ const repl = require("repl");
|
||||
class REPL {
|
||||
constructor(options) {
|
||||
this.env = options.env;
|
||||
this.plugins = options.plugins;
|
||||
}
|
||||
|
||||
start(done) {
|
||||
@ -15,6 +16,19 @@ class REPL {
|
||||
process.exit();
|
||||
});
|
||||
|
||||
let self = this;
|
||||
this.replServer.defineCommand('profile', {
|
||||
help: 'Profile a contract',
|
||||
action(contract) {
|
||||
this.clearBufferedCommand();
|
||||
let pluginCmds = self.plugins.getPluginsProperty('console', 'console');
|
||||
for (let pluginCmd of pluginCmds) {
|
||||
pluginCmd.call(self, `profile ${contract}`, {});
|
||||
}
|
||||
this.displayPrompt();
|
||||
}
|
||||
});
|
||||
|
||||
done();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user