From 4bdf46913168b2085b081e2fe86522584e39f3a4 Mon Sep 17 00:00:00 2001 From: Jonathan Rainville Date: Tue, 22 May 2018 15:46:58 -0400 Subject: [PATCH] conflict in en.json --- lib/cmd.js | 2 ++ lib/i18n/locales/en.json | 8 +++++++- lib/index.js | 15 ++++++++++----- 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/lib/cmd.js b/lib/cmd.js index 78bc976b..2550e48f 100644 --- a/lib/cmd.js +++ b/lib/cmd.js @@ -202,12 +202,14 @@ class Cmd { .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)')) + .option('-c, --client [client]', __('Use a specific ethereum client or simulator (supported: %s)', 'geth, testrpc')) .description(__('Upload your dapp to a decentralized storage') + ' (e.g embark upload ipfs).') .action(function (env, _options) { i18n.setOrDetectLocale(_options.locale); _options.env = env || 'development'; _options.logFile = _options.logfile; // fix casing _options.logLevel = _options.loglevel; // fix casing + _options.client = _options.client || 'geth'; embark.upload(_options); }); } diff --git a/lib/i18n/locales/en.json b/lib/i18n/locales/en.json index 08f5bee3..20c160ac 100644 --- a/lib/i18n/locales/en.json +++ b/lib/i18n/locales/en.json @@ -118,5 +118,11 @@ "Type": "Type", "to see the list of available commands": "to see the list of available commands", "instantiated js-ipfs object configured to the current environment (available if ipfs is enabled)": "instantiated js-ipfs object configured to the current environment (available if ipfs is enabled)", - "reset done!": "reset done!" + "reset done!": "reset done!", + "finished building": "finished building", + "finished deploying": "finished deploying", + "adding %s to ipfs": "adding %s to ipfs", + "DApp available at": "DApp available at", + "successfully uploaded to ipfs": "successfully uploaded to ipfs", + "finished building DApp and deploying to": "finished building DApp and deploying to" } diff --git a/lib/index.js b/lib/index.js index 5ad42cfd..3b03d9a4 100644 --- a/lib/index.js +++ b/lib/index.js @@ -305,6 +305,8 @@ class Embark { let engine = new Engine({ env: options.env, + client: options.client, + locale: options.locale, isDev: this.isDev(options.env), version: this.version, embarkConfig: 'embark.json', @@ -385,12 +387,15 @@ class Embark { }) .catch(callback); }); - // 1. build the contracts and dapp webpack - engine.deployManager.deployContracts(function (err) { - engine.logger.info(__("finished deploying").underline); - if(err){ + + engine.onReady(() => { + // 1. build the contracts and dapp webpack + engine.deployManager.deployContracts(function (err) { + engine.logger.info(__("finished deploying").underline); + if(err){ callback(err); - } + } + }); }); } ], function (err, _result) {