Merge pull request #432 from embark-framework/addCompileOnlyFlag

add command for only compiling contracts in build command
This commit is contained in:
RJ Catalano 2018-05-17 16:56:50 -05:00 committed by GitHub
commit 380b2258e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -92,6 +92,7 @@ class Cmd {
build() { build() {
program program
.command('build [environment]') .command('build [environment]')
.option('--contracts', 'only compile contracts into Embark wrappers')
.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"]', /^(error|warn|info|debug|trace)$/i, 'debug') .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)')) .option('--locale [locale]', __('language to use (default: en)'))
@ -101,6 +102,7 @@ class Cmd {
_options.env = env || 'development'; _options.env = env || 'development';
_options.logFile = _options.logfile; // fix casing _options.logFile = _options.logfile; // fix casing
_options.logLevel = _options.loglevel; // fix casing _options.logLevel = _options.loglevel; // fix casing
_options.onlyCompile = _options.contracts;
embark.build(_options); embark.build(_options);
}); });
} }

View File

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