From d5ebd7d7487ee33d3f0228a08bf9bb096555a835 Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Thu, 2 Mar 2017 20:23:03 -0500 Subject: [PATCH] fix for current refactor: on an asset change don't redeploy --- lib/index.js | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) 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) {