From a8193277dae72b248b4181296fbf95f36a3fe9b8 Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Sun, 19 Feb 2017 13:18:43 -0500 Subject: [PATCH] start refactoring index.js --- lib/index.js | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/lib/index.js b/lib/index.js index b0388809..4d3f12ff 100644 --- a/lib/index.js +++ b/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); } };