Add --loglevel validation for `run` and `build`

This commit is contained in:
emizzle 2018-04-19 14:43:41 +10:00
parent 96495b99c3
commit 09ca551a22
1 changed files with 2 additions and 2 deletions

View File

@ -88,7 +88,7 @@ class Cmd {
program program
.command('build [environment]') .command('build [environment]')
.option('--logfile [logfile]', 'filename to output logs (default: none)') .option('--logfile [logfile]', 'filename to output logs (default: none)')
.option('--loglevel [loglevel]', 'level of logging to display ["error", "warn", "info", "debug", "trace"] (default: debug)') .option('--loglevel [loglevel]', 'level of logging to display ["error", "warn", "info", "debug", "trace"]', /^(error|warn|info|debug|trace)$/i, 'debug')
.description('deploy and build dapp at dist/ (default: development)') .description('deploy and build dapp at dist/ (default: development)')
.action(function (env, _options) { .action(function (env, _options) {
_options.env = env || 'development'; _options.env = env || 'development';
@ -107,7 +107,7 @@ class Cmd {
.option('--nodashboard', 'simple mode, disables the dashboard') .option('--nodashboard', 'simple mode, disables the dashboard')
.option('--no-color', 'no colors in case it\'s needed for compatbility purposes') .option('--no-color', 'no colors in case it\'s needed for compatbility purposes')
.option('--logfile [logfile]', 'filename to output logs (default: none)') .option('--logfile [logfile]', 'filename to output logs (default: none)')
.option('--loglevel [loglevel]', 'level of logging to display ["error", "warn", "info", "debug", "trace"] (default: debug)',) .option('--loglevel [loglevel]', 'level of logging to display ["error", "warn", "info", "debug", "trace"]', /^(error|warn|info|debug|trace)$/i, 'debug')
.description('run dapp (default: development)') .description('run dapp (default: development)')
.action(function (env, options) { .action(function (env, options) {
embark.run({ embark.run({