From dd9e85fa2732f6a506a812b0362331eca687a3fa Mon Sep 17 00:00:00 2001 From: VoR0220 Date: Thu, 17 May 2018 15:37:57 -0500 Subject: [PATCH] add command for only compiling contracts in build command Signed-off-by: VoR0220 --- lib/cmd.js | 2 ++ lib/index.js | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/cmd.js b/lib/cmd.js index d59c3f1e..17a73e21 100644 --- a/lib/cmd.js +++ b/lib/cmd.js @@ -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); }); } diff --git a/lib/index.js b/lib/index.js index 3ee5d90f..f0c81fab 100644 --- a/lib/index.js +++ b/lib/index.js @@ -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();