fix for current refactor: on an asset change don't redeploy

This commit is contained in:
Iuri Matias 2017-03-02 20:23:03 -05:00
parent fe30f4b040
commit d5ebd7d748
1 changed files with 7 additions and 8 deletions

View File

@ -146,8 +146,15 @@ var Embark = {
plugins: self.plugins plugins: self.plugins
}); });
self.events.on('abi', function(abi) { self.events.on('abi', function(abi) {
Embark.currentAbi = abi;
pipeline.build(abi); pipeline.build(abi);
}); });
self.events.on('file-event', function(fileType, path) {
if (fileType === 'asset') {
self.config.reloadConfig();
pipeline.build(Embark.abi);
}
});
callback(); callback();
}, },
@ -188,14 +195,6 @@ var Embark = {
deployManager.deployContracts(function() {}); 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) { function watchFilesForChanges(callback) {