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) {
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');
}

View File

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