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;