mirror of https://github.com/embarklabs/embark.git
Adding Console Command
This commit is contained in:
parent
65b29d5db6
commit
eb2172a0f5
27
lib/cmd.js
27
lib/cmd.js
|
@ -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]')
|
||||
|
|
|
@ -237,6 +237,10 @@ class Embark {
|
|||
});
|
||||
}
|
||||
|
||||
console(options) {
|
||||
|
||||
}
|
||||
|
||||
graph(options) {
|
||||
this.context = options.context || [constants.contexts.graph];
|
||||
options.onlyCompile = true;
|
||||
|
|
Loading…
Reference in New Issue