support versions on embark json config

This commit is contained in:
Iuri Matias 2018-03-31 19:35:20 -04:00
parent 94887f933d
commit 03f0b07d81
13 changed files with 26 additions and 28 deletions

View File

@ -18,6 +18,7 @@ var Config = function(options) {
this.plugins = options.plugins; this.plugins = options.plugins;
this.logger = options.logger; this.logger = options.logger;
this.events = options.events; this.events = options.events;
this.embarkConfig = {};
}; };
Config.prototype.loadConfigFiles = function(options) { Config.prototype.loadConfigFiles = function(options) {
@ -92,7 +93,7 @@ Config.prototype.loadBlockchainConfigFile = function() {
Config.prototype.loadContractsConfigFile = function() { Config.prototype.loadContractsConfigFile = function() {
var configObject = { var configObject = {
"default": { "default": {
"versions": { "versions": this.embarkConfig.versions || {
"web3.js": "1.0.0-beta", "web3.js": "1.0.0-beta",
"solc": "0.4.17" "solc": "0.4.17"
}, },
@ -120,7 +121,7 @@ Config.prototype.loadContractsConfigFile = function() {
Config.prototype.loadStorageConfigFile = function() { Config.prototype.loadStorageConfigFile = function() {
var configObject = { var configObject = {
"default": { "default": {
"versions": { "versions": this.embarkConfig.versions || {
"ipfs-api": "17.2.4" "ipfs-api": "17.2.4"
}, },
"enabled": true, "enabled": true,

View File

@ -1,9 +1,5 @@
{ {
"default": { "default": {
"versions": {
"web3.js": "1.0.0-beta",
"solc": "0.4.17"
},
"deployment": { "deployment": {
"host": "localhost", "host": "localhost",
"port": 8545, "port": 8545,

View File

@ -1,8 +1,5 @@
{ {
"default": { "default": {
"versions": {
"ipfs-api": "17.2.4"
},
"enabled": true, "enabled": true,
"ipfs_bin": "ipfs", "ipfs_bin": "ipfs",
"provider": "ipfs", "provider": "ipfs",

View File

@ -8,5 +8,10 @@
}, },
"buildDir": "dist/", "buildDir": "dist/",
"config": "config/", "config": "config/",
"versions": {
"web3.js": "1.0.0-beta",
"solc": "0.4.17",
"ipfs-api": "17.2.4"
},
"plugins": {} "plugins": {}
} }

View File

@ -1,9 +1,5 @@
{ {
"default": { "default": {
"versions": {
"web3.js": "1.0.0-beta",
"solc": "0.4.17"
},
"deployment": { "deployment": {
"host": "localhost", "host": "localhost",
"port": 8545, "port": 8545,

View File

@ -1,8 +1,5 @@
{ {
"default": { "default": {
"versions": {
"ipfs-api": "17.2.4"
},
"enabled": true, "enabled": true,
"ipfs_bin": "ipfs", "ipfs_bin": "ipfs",
"provider": "ipfs", "provider": "ipfs",

View File

@ -7,6 +7,11 @@
}, },
"buildDir": "dist/", "buildDir": "dist/",
"config": "config/", "config": "config/",
"versions": {
"web3.js": "1.0.0-beta",
"solc": "0.4.17",
"ipfs-api": "17.2.4"
},
"plugins": { "plugins": {
} }
} }

View File

@ -1,9 +1,5 @@
{ {
"default": { "default": {
"versions": {
"web3.js": "1.0.0-beta",
"solc": "0.4.17"
},
"deployment": { "deployment": {
"host": "localhost", "host": "localhost",
"port": 8545, "port": 8545,

View File

@ -3,5 +3,8 @@
"app": {}, "app": {},
"buildDir": "build/", "buildDir": "build/",
"config": "./", "config": "./",
"versions": {
"solc": "0.4.17"
},
"plugins": {} "plugins": {}
} }

View File

@ -2,5 +2,9 @@
"contracts": ["contracts/**"], "contracts": ["contracts/**"],
"app": {}, "app": {},
"buildDir": "build/", "buildDir": "build/",
"config": "./" "config": "./",
"versions": {
"web3.js": "1.0.0-beta",
"solc": "0.4.17"
}
} }

View File

@ -1,9 +1,5 @@
{ {
"default": { "default": {
"versions": {
"web3.js": "1.0.0-beta.27",
"solc": "0.4.18"
},
"deployment": { "deployment": {
"host": "localhost", "host": "localhost",
"port": 8545, "port": 8545,

View File

@ -1,8 +1,5 @@
{ {
"default": { "default": {
"versions": {
"ipfs-api": "17.2.6"
},
"enabled": true, "enabled": true,
"available_providers": ["ipfs"], "available_providers": ["ipfs"],
"ipfs_bin": "ipfs", "ipfs_bin": "ipfs",

View File

@ -14,6 +14,11 @@
}, },
"buildDir": "dist/", "buildDir": "dist/",
"config": "config/", "config": "config/",
"versions": {
"web3.js": "1.0.0-beta.27",
"solc": "0.4.18",
"ipfs-api": "17.2.6"
},
"plugins": { "plugins": {
"embark-service": {} "embark-service": {}
} }