mirror of
https://github.com/embarklabs/embark.git
synced 2025-01-12 06:44:37 +00:00
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.logLevel = _options.loglevel; // fix casing
|
||||||
_options.onlyCompile = _options.contracts;
|
_options.onlyCompile = _options.contracts;
|
||||||
_options.client = _options.client || 'geth';
|
_options.client = _options.client || 'geth';
|
||||||
|
embark.initConfig(env || 'development', {
|
||||||
|
embarkConfig: 'embark.json',
|
||||||
|
interceptLogs: false
|
||||||
|
});
|
||||||
embark.build(_options);
|
embark.build(_options);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -217,6 +221,10 @@ class Cmd {
|
|||||||
_options.logFile = _options.logfile; // fix casing
|
_options.logFile = _options.logfile; // fix casing
|
||||||
_options.logLevel = _options.loglevel; // fix casing
|
_options.logLevel = _options.loglevel; // fix casing
|
||||||
_options.client = _options.client || 'geth';
|
_options.client = _options.client || 'geth';
|
||||||
|
embark.initConfig(env || 'development', {
|
||||||
|
embarkConfig: 'embark.json',
|
||||||
|
interceptLogs: false
|
||||||
|
});
|
||||||
embark.upload(_options);
|
embark.upload(_options);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -231,6 +239,10 @@ class Cmd {
|
|||||||
.description(__('generates documentation based on the smart contracts configured'))
|
.description(__('generates documentation based on the smart contracts configured'))
|
||||||
.action(function (env, options) {
|
.action(function (env, options) {
|
||||||
i18n.setOrDetectLocale(options.locale);
|
i18n.setOrDetectLocale(options.locale);
|
||||||
|
embark.initConfig(env || 'development', {
|
||||||
|
embarkConfig: 'embark.json',
|
||||||
|
interceptLogs: false
|
||||||
|
});
|
||||||
embark.graph({
|
embark.graph({
|
||||||
env: env || 'development',
|
env: env || 'development',
|
||||||
logFile: options.logfile,
|
logFile: options.logfile,
|
||||||
|
@ -180,6 +180,9 @@ Config.prototype.loadBlockchainConfigFile = function() {
|
|||||||
let configFilePath = this._getFileOrOject(this.configDir, 'blockchain', 'blockchain');
|
let configFilePath = this._getFileOrOject(this.configDir, 'blockchain', 'blockchain');
|
||||||
|
|
||||||
this.blockchainConfig = this._mergeConfig(configFilePath, configObject, this.env, true);
|
this.blockchainConfig = this._mergeConfig(configFilePath, configObject, this.env, true);
|
||||||
|
if (!configFilePath) {
|
||||||
|
this.blockchainConfig.default = true;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
Config.prototype.loadContractsConfigFile = function() {
|
Config.prototype.loadContractsConfigFile = function() {
|
||||||
|
@ -35,7 +35,7 @@ class Embark {
|
|||||||
}
|
}
|
||||||
|
|
||||||
isDev() {
|
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) {
|
blockchain(env, client) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user