add better message at the end

This commit is contained in:
Jonathan Rainville 2018-10-18 12:09:04 -04:00 committed by Pascal Precht
parent 551d1e209b
commit 479b79eeaf
No known key found for this signature in database
GPG Key ID: 0EE28D8D6FD85D7D
2 changed files with 7 additions and 7 deletions

View File

@ -495,13 +495,14 @@ class EmbarkController {
callback(); 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(__("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(__("To see the result, execute {{cmd}} and go to /{{contract}}.html", {cmd: 'embark run'.underline, contract: options.contract}));
engine.logger.info((` "js/${options.contract}.js": [\n` +
` "${options.contract}.js"\n` +
` ],\n` +
` "index.html": "app/${options.contract}.html"`).cyan);
process.exit(); process.exit();
}); });
} }

View File

@ -26,7 +26,6 @@ class ScaffoldingSolidity {
const template = Handlebars.compile(source); const template = Handlebars.compile(source);
// Write template // Write template
console.dir(data);
const result = template(data); const result = template(data);
fs.writeFileSync(filePath, result); fs.writeFileSync(filePath, result);
return filePath; return filePath;