Adding Console Command

This commit is contained in:
Anthony Laibe 2018-07-23 09:34:21 +01:00
parent 65b29d5db6
commit eb2172a0f5
2 changed files with 31 additions and 0 deletions

View File

@ -13,6 +13,7 @@ class Cmd {
this.demo();
this.build();
this.run();
this.console();
this.blockchain();
this.simulator();
this.test();
@ -138,6 +139,32 @@ class Cmd {
});
}
console() {
program
.command('console [environment]')
.option('-p, --port [port]', __('port to run the dev webserver (default: %s)', '8000'))
.option('-c, --client [client]', __('Use a specific ethereum client or simulator (supported: %s)', 'geth, testrpc'))
.option('--no-color', __('no colors in case it\'s needed for compatbility purposes'))
.option('--logfile [logfile]', __('filename to output logs (default: %s)', 'none'))
.option('--loglevel [loglevel]', __('level of logging to display') + ' ["error", "warn", "info", "debug", "trace"]', /^(error|warn|info|debug|trace)$/i, 'debug')
.option('--locale [locale]', __('language to use (default: en)'))
.description(__('deploy, build dapp at ') + 'dist/ (default: development)' + __(' and display the console'))
.action(function (env, options) {
i18n.setOrDetectLocale(options.locale);
embark.console({
env: env || 'development',
serverPort: options.port,
serverHost: options.host,
client: options.client || 'geth',
locale: options.locale,
runWebserver: !options.noserver,
useDashboard: !options.nodashboard,
logFile: options.logfile,
logLevel: options.loglevel
});
});
}
blockchain() {
program
.command('blockchain [environment]')

View File

@ -237,6 +237,10 @@ class Embark {
});
}
console(options) {
}
graph(options) {
this.context = options.context || [constants.contexts.graph];
options.onlyCompile = true;