mirror of https://github.com/embarklabs/embark.git
Adding Console Command
This commit is contained in:
parent
38817ddab2
commit
7752b1aa54
27
lib/cmd.js
27
lib/cmd.js
|
@ -13,6 +13,7 @@ class Cmd {
|
||||||
this.demo();
|
this.demo();
|
||||||
this.build();
|
this.build();
|
||||||
this.run();
|
this.run();
|
||||||
|
this.console();
|
||||||
this.blockchain();
|
this.blockchain();
|
||||||
this.simulator();
|
this.simulator();
|
||||||
this.test();
|
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() {
|
blockchain() {
|
||||||
program
|
program
|
||||||
.command('blockchain [environment]')
|
.command('blockchain [environment]')
|
||||||
|
|
|
@ -234,6 +234,10 @@ class Embark {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console(options) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
graph(options) {
|
graph(options) {
|
||||||
this.context = options.context || [constants.contexts.graph];
|
this.context = options.context || [constants.contexts.graph];
|
||||||
options.onlyCompile = true;
|
options.onlyCompile = true;
|
||||||
|
|
Loading…
Reference in New Issue