start refactoring index.js
This commit is contained in:
parent
5e4ad9a7e5
commit
a8193277da
30
lib/index.js
30
lib/index.js
|
@ -37,11 +37,6 @@ var Embark = {
|
|||
cmd.process(args);
|
||||
},
|
||||
|
||||
generateTemplate: function(templateName, destinationFolder, name) {
|
||||
var templateGenerator = new TemplateGenerator(templateName);
|
||||
templateGenerator.generate(destinationFolder, name);
|
||||
},
|
||||
|
||||
initConfig: function(env, options) {
|
||||
this.logger = new Logger({logLevel: 'debug'});
|
||||
|
||||
|
@ -51,6 +46,21 @@ var Embark = {
|
|||
|
||||
},
|
||||
|
||||
blockchain: function(env, client) {
|
||||
var blockchain = Blockchain(this.config.blockchainConfig, client);
|
||||
blockchain.run({env: env});
|
||||
},
|
||||
|
||||
simulator: function(options) {
|
||||
var simulator = new Simulator({blockchainConfig: this.config.blockchainConfig});
|
||||
simulator.run(options);
|
||||
},
|
||||
|
||||
generateTemplate: function(templateName, destinationFolder, name) {
|
||||
var templateGenerator = new TemplateGenerator(templateName);
|
||||
templateGenerator.generate(destinationFolder, name);
|
||||
},
|
||||
|
||||
redeploy: function(env) {
|
||||
var self = this;
|
||||
async.waterfall([
|
||||
|
@ -193,11 +203,6 @@ var Embark = {
|
|||
});
|
||||
},
|
||||
|
||||
blockchain: function(env, client) {
|
||||
var blockchain = Blockchain(this.config.blockchainConfig, client);
|
||||
blockchain.run({env: env});
|
||||
},
|
||||
|
||||
buildAndDeploy: function(done) {
|
||||
var self = this;
|
||||
async.waterfall([
|
||||
|
@ -340,11 +345,6 @@ var Embark = {
|
|||
console.log(("unknown platform: " + platform).red);
|
||||
console.log('try "embark upload ipfs" or "embark upload swarm"'.green);
|
||||
}
|
||||
},
|
||||
|
||||
simulator: function(options) {
|
||||
var simulator = new Simulator({blockchainConfig: this.config.blockchainConfig});
|
||||
simulator.run(options);
|
||||
}
|
||||
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue