mirror of https://github.com/embarklabs/embark.git
set isDev as default if there is no blockchain file
This commit is contained in:
parent
d0525c7e5b
commit
325800bc59
12
lib/cmd.js
12
lib/cmd.js
|
@ -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,
|
||||
|
|
|
@ -180,6 +180,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() {
|
||||
|
|
|
@ -35,7 +35,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) {
|
||||
|
|
Loading…
Reference in New Issue