touch ups

This commit is contained in:
Jonathan Rainville 2018-05-08 09:52:06 -04:00
parent a03777dc65
commit 7d64b705a3
2 changed files with 5 additions and 6 deletions

View File

@ -182,6 +182,9 @@ class Engine {
if (self.watch) { if (self.watch) {
self.watch.restart(); // Necessary because changing a file while it is writing can stop it from being watched self.watch.restart(); // Necessary because changing a file while it is writing can stop it from being watched
} }
if (msg.error) {
return self.logger.error(msg.error);
}
return self.events.emit('outputDone'); return self.events.emit('outputDone');
} }

View File

@ -285,7 +285,6 @@ class Pipeline {
webpack(webpackOptions).run((_err, _stats) => { webpack(webpackOptions).run((_err, _stats) => {
if (_err) { if (_err) {
console.log('ERROS');
console.log(_err); console.log(_err);
} }
if (!detectErrors) { if (!detectErrors) {
@ -364,10 +363,8 @@ class Pipeline {
} }
], cb); ], cb);
} }
} }
process.on('message', (msg) => { process.on('message', (msg) => {
if (msg.action === constants.pipeline.init) { if (msg.action === constants.pipeline.init) {
pipeline = new Pipeline(msg.options); pipeline = new Pipeline(msg.options);
@ -375,13 +372,12 @@ process.on('message', (msg) => {
} }
if (msg.action === constants.pipeline.build) { if (msg.action === constants.pipeline.build) {
return pipeline.build(msg.abi, msg.contractsJSON, msg.path, (err, result) => { return pipeline.build(msg.abi, msg.contractsJSON, msg.path, (err) => {
process.send({result: constants.pipeline.built, error: err, data: result}); process.send({result: constants.pipeline.built, error: err});
}); });
} }
}); });
process.on('exit', () => { process.on('exit', () => {
process.exit(0); process.exit(0);
}); });