Reload config when a file is added/removed

This commit is contained in:
Anthony Laibe 2018-08-15 09:59:06 +01:00 committed by Iuri Matias
parent f90132af1e
commit dd8658a59a
1 changed files with 1 additions and 2 deletions

View File

@ -179,6 +179,7 @@ class Engine {
self.fileTimeout = setTimeout(() => {
// TODO: still need to redeploy contracts because the original contracts
// config is being corrupted
self.config.reloadConfig();
if (fileType === 'asset') {
// Throttle file changes so we re-write only once for all files
self.events.emit('asset-changed', self.contractsManager);
@ -186,8 +187,6 @@ class Engine {
// TODO: for now need to deploy on asset changes as well
// because the contractsManager config is corrupted after a deploy
if (fileType === 'contract' || fileType === 'config') {
self.config.reloadConfig();
self.events.request('deploy:contracts', () => {});
}
}, 50);