From 479b79eeaf3735afee33331c8abdf95ca338d0f6 Mon Sep 17 00:00:00 2001 From: Jonathan Rainville Date: Thu, 18 Oct 2018 12:09:04 -0400 Subject: [PATCH] add better message at the end --- cmd/cmd_controller.js | 13 +++++++------ lib/modules/scaffolding-solidity/index.js | 1 - 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cmd/cmd_controller.js b/cmd/cmd_controller.js index c291c03a5..eafc108d0 100644 --- a/cmd/cmd_controller.js +++ b/cmd/cmd_controller.js @@ -495,13 +495,14 @@ class EmbarkController { callback(); }); } - ], function(_err) { + ], function(err) { + if (err) { + engine.logger.error(__("Error generating the UI: ")); + engine.logger.error(err.message || err); + process.exit(1); + } engine.logger.info(__("finished generating the UI").underline); - engine.logger.info(__("You can add the UI to your Dapp easily by adding the following in embark.json:")); - engine.logger.info((` "js/${options.contract}.js": [\n` + - ` "${options.contract}.js"\n` + - ` ],\n` + - ` "index.html": "app/${options.contract}.html"`).cyan); + engine.logger.info(__("To see the result, execute {{cmd}} and go to /{{contract}}.html", {cmd: 'embark run'.underline, contract: options.contract})); process.exit(); }); } diff --git a/lib/modules/scaffolding-solidity/index.js b/lib/modules/scaffolding-solidity/index.js index 0588ebb61..2f2fc5c78 100644 --- a/lib/modules/scaffolding-solidity/index.js +++ b/lib/modules/scaffolding-solidity/index.js @@ -26,7 +26,6 @@ class ScaffoldingSolidity { const template = Handlebars.compile(source); // Write template - console.dir(data); const result = template(data); fs.writeFileSync(filePath, result); return filePath;