read version in from package.json instead of strings

This commit is contained in:
Todd Baur 2017-03-08 23:20:23 +09:00
parent 71121cdc4b
commit 486fbec108
3 changed files with 6 additions and 3 deletions

View File

@ -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) {

View File

@ -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();

View File

@ -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);