mirror of https://github.com/embarklabs/embark.git
fix reload file removing plugins
This commit is contained in:
parent
d0ad16004b
commit
c225d97e4b
|
@ -13,10 +13,6 @@
|
|||
"reset": "reset",
|
||||
"any": "any"
|
||||
},
|
||||
"events": {
|
||||
"contractFilesChanged": "contractFilesChanged",
|
||||
"contractConfigChanged": "contractConfigChanged"
|
||||
},
|
||||
"process": {
|
||||
"processLaunchRequest": "process:launch-request",
|
||||
"processLaunchComplete": "process:launch-complete",
|
||||
|
|
|
@ -222,7 +222,6 @@ Config.prototype.loadContractsConfigFile = function() {
|
|||
const newContractsConfig = this._mergeConfig(configFilePath, configObject, this.env);
|
||||
|
||||
if (!deepEqual(newContractsConfig, this.contractsConfig)) {
|
||||
this.events.emit(constants.events.contractConfigChanged, newContractsConfig);
|
||||
this.contractsConfig = newContractsConfig;
|
||||
}
|
||||
};
|
||||
|
@ -333,8 +332,11 @@ Config.prototype.loadEmbarkConfigFile = function() {
|
|||
const contracts = this.embarkConfig.contracts;
|
||||
const newContractsFiles = this.loadFiles(contracts);
|
||||
if (!this.contractFiles || newContractsFiles.length !== this.contractFiles.length || !deepEqual(newContractsFiles, this.contractFiles)) {
|
||||
this.events.emit(constants.events.contractFilesChanged, newContractsFiles);
|
||||
this.contractsFiles = newContractsFiles;
|
||||
this.contractsFiles = this.contractsFiles.concat(newContractsFiles).filter((file, index, arr) => {
|
||||
return !arr.some((file2, index2) => {
|
||||
return file.filename === file2.filename && index < index2;
|
||||
});
|
||||
});
|
||||
}
|
||||
// determine contract 'root' directories
|
||||
this.contractDirectories = contracts.map((dir) => {
|
||||
|
|
|
@ -2,7 +2,6 @@ const async = require('async');
|
|||
const Engine = require('../core/engine.js');
|
||||
const TestLogger = require('./test_logger.js');
|
||||
const Web3 = require('web3');
|
||||
const constants = require('../constants');
|
||||
const Events = require('../core/events');
|
||||
const AccountParser = require('../utils/accountParser');
|
||||
// TODO: breaks module isolation; tests need to be refactored to use the engine and avoid this
|
||||
|
@ -272,7 +271,6 @@ class Test {
|
|||
async.waterfall([
|
||||
function getConfig(next) {
|
||||
self.engine.config.contractsConfig = {contracts: config.contracts, versions: self.versions_default};
|
||||
self.engine.events.emit(constants.events.contractConfigChanged, self.engine.config.contractsConfig);
|
||||
next();
|
||||
},
|
||||
function getAccounts(next) {
|
||||
|
|
Loading…
Reference in New Issue