set isDev as default if there is no blockchain file

This commit is contained in:
Jonathan Rainville 2018-07-09 15:20:47 -04:00 committed by Iuri Matias
parent 4fedf704a8
commit 838fa92775
3 changed files with 16 additions and 1 deletions

View File

@ -105,6 +105,10 @@ class Cmd {
_options.logLevel = _options.loglevel; // fix casing
_options.onlyCompile = _options.contracts;
_options.client = _options.client || 'geth';
embark.initConfig(env || 'development', {
embarkConfig: 'embark.json',
interceptLogs: false
});
embark.build(_options);
});
}
@ -217,6 +221,10 @@ class Cmd {
_options.logFile = _options.logfile; // fix casing
_options.logLevel = _options.loglevel; // fix casing
_options.client = _options.client || 'geth';
embark.initConfig(env || 'development', {
embarkConfig: 'embark.json',
interceptLogs: false
});
embark.upload(_options);
});
}
@ -231,6 +239,10 @@ class Cmd {
.description(__('generates documentation based on the smart contracts configured'))
.action(function (env, options) {
i18n.setOrDetectLocale(options.locale);
embark.initConfig(env || 'development', {
embarkConfig: 'embark.json',
interceptLogs: false
});
embark.graph({
env: env || 'development',
logFile: options.logfile,

View File

@ -184,6 +184,9 @@ Config.prototype.loadBlockchainConfigFile = function() {
let configFilePath = this._getFileOrOject(this.configDir, 'blockchain', 'blockchain');
this.blockchainConfig = this._mergeConfig(configFilePath, configObject, this.env, true);
if (!configFilePath) {
this.blockchainConfig.default = true;
}
};
Config.prototype.loadContractsConfigFile = function() {

View File

@ -31,7 +31,7 @@ class Embark {
}
isDev() {
return this.config && this.config.blockchainConfig && this.config.blockchainConfig.isDev;
return this.config && this.config.blockchainConfig && (this.config.blockchainConfig.isDev || this.config.blockchainConfig.default);
}
blockchain(env, client) {