diff --git a/lib/index.js b/lib/index.js index 7037f2246..96bc18baa 100644 --- a/lib/index.js +++ b/lib/index.js @@ -104,7 +104,7 @@ var Embark = (function () { }); }); - engine.deployManager.deployContracts(function() { + engine.deployManager.deployContracts(function(err) { engine.startService("fileWatcher"); if (options.runWebserver) { engine.startService("webServer", { @@ -112,12 +112,13 @@ var Embark = (function () { port: options.serverPort }); } - callback(); + callback(err); }); } ], function(err, result) { if (err) { engine.logger.error(err.message); + engine.logger.info(err.stack); } else { engine.logger.setStatus("Ready".green); engine.logger.info("Looking for documentation? you can find it at ".cyan + "http://embark.readthedocs.io/".green.underline); @@ -142,20 +143,22 @@ var Embark = (function () { if (pluginList.length > 0) { engine.logger.info("loaded plugins: " + pluginList.join(", ")); } - + + engine.startService("web3"); engine.startService("pipeline"); engine.startService("abi"); engine.startService("deployment"); callback(); }, function deploy(callback) { - engine.deployManager.deployContracts(function() { - callback(); + engine.deployManager.deployContracts(function(err) { + callback(err); }); } ], function(err, result) { if (err) { engine.logger.error(err.message); + engine.logger.debug(err.stack) } else { engine.logger.info("finished building".underline); } @@ -164,9 +167,8 @@ var Embark = (function () { }); } - function initTests (options) { - var Test = require('./core/test.js'); - return new Test(options); + function initTests () { + return require('./core/test.js'); } // TODO: should deploy if it hasn't already @@ -198,4 +200,3 @@ var Embark = (function () { })(); module.exports = Embark; - diff --git a/package.json b/package.json index 0e553fb0a..2ba2bccc5 100644 --- a/package.json +++ b/package.json @@ -29,6 +29,7 @@ "promptly": "^2.1.0", "serve-static": "^1.11.1", "shelljs": "^0.5.0", + "ethereumjs-testrpc": "^3.0.3", "solc": "0.4.8", "toposort": "^1.0.0", "web3": "^0.18.2"