diff --git a/lib/index.js b/lib/index.js index d97fb63b..55040224 100644 --- a/lib/index.js +++ b/lib/index.js @@ -146,8 +146,15 @@ var Embark = { plugins: self.plugins }); self.events.on('abi', function(abi) { + Embark.currentAbi = abi; pipeline.build(abi); }); + self.events.on('file-event', function(fileType, path) { + if (fileType === 'asset') { + self.config.reloadConfig(); + pipeline.build(Embark.abi); + } + }); callback(); }, @@ -188,14 +195,6 @@ var Embark = { deployManager.deployContracts(function() {}); } }); - self.events.on('file-event', function(fileType, path) { - if (fileType === 'asset') { - // TODO: can just rebuild pipeline, no need to deploy contracts - // again - self.config.reloadConfig(); - deployManager.deployContracts(function() {}); - } - }); }, function watchFilesForChanges(callback) {