add command for only compiling contracts in build command

Signed-off-by: VoR0220 <catalanor0220@gmail.com>
This commit is contained in:
VoR0220 2018-05-17 15:37:57 -05:00
parent 69e264e765
commit dd9e85fa27
2 changed files with 3 additions and 1 deletions

View File

@ -92,6 +92,7 @@ class Cmd {
build() {
program
.command('build [environment]')
.option('--contracts', 'only compile contracts into Embark wrappers')
.option('--logfile [logfile]', __('filename to output logs (default: 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)'))
@ -101,6 +102,7 @@ class Cmd {
_options.env = env || 'development';
_options.logFile = _options.logfile; // fix casing
_options.logLevel = _options.loglevel; // fix casing
_options.onlyCompile = _options.contracts;
embark.build(_options);
});
}

View File

@ -204,7 +204,7 @@ class Embark {
engine.startService("web3");
engine.startService("pipeline");
engine.startService("codeGenerator");
engine.startService("deployment");
engine.startService("deployment", {onlyCompile: options.onlyCompile});
engine.startService("ipfs");
engine.startService("swarm", {bzz: engine.web3.bzz});
callback();