From 486fbec108388989b975ab6c6a6abbd1e231b5d1 Mon Sep 17 00:00:00 2001 From: Todd Baur Date: Wed, 8 Mar 2017 23:20:23 +0900 Subject: [PATCH] read version in from package.json instead of strings --- lib/core/engine.js | 3 ++- lib/dashboard/monitor.js | 3 ++- lib/index.js | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/core/engine.js b/lib/core/engine.js index 872d8fc7..df17ce90 100644 --- a/lib/core/engine.js +++ b/lib/core/engine.js @@ -9,12 +9,13 @@ var ServicesMonitor = require('./services.js'); var Pipeline = require('../pipeline/pipeline.js'); var Server = require('../pipeline/server.js'); var Watch = require('../pipeline/watch.js'); +var version = require('../../package.json')['version']; var Engine = function(options) { this.env = options.env; this.embarkConfig = options.embarkConfig; this.interceptLogs = options.interceptLogs; - this.version = "2.4.0"; + this.version = version; }; Engine.prototype.init = function(_options) { diff --git a/lib/dashboard/monitor.js b/lib/dashboard/monitor.js index 5468128b..bbce536d 100644 --- a/lib/dashboard/monitor.js +++ b/lib/dashboard/monitor.js @@ -2,9 +2,10 @@ var blessed = require("blessed"); var CommandHistory = require('./command_history.js'); +var version = require('../../package.json')['version']; function Dashboard(options) { - var title = (options && options.title) || "Embark 2.4.0"; + var title = (options && options.title) || "Embark " + version; this.env = options.env; this.console = options.console; this.history = new CommandHistory(); diff --git a/lib/index.js b/lib/index.js index 97877acb..a6662f48 100644 --- a/lib/index.js +++ b/lib/index.js @@ -22,10 +22,11 @@ var IPFS = require('./upload/ipfs.js'); var Swarm = require('./upload/swarm.js'); var Cmd = require('./cmd.js'); +var version = require('../package.json')['version']; var Embark = { - version: '2.4.0', + version: version, process: function(args) { var cmd = new Cmd(Embark);