From 83d43af846cd9c89c1e32d5321602a22c78bee5c Mon Sep 17 00:00:00 2001 From: Patrick Golden Date: Thu, 16 Apr 2015 14:56:39 -0400 Subject: [PATCH] Version only lives in package.json Now all the places that use the version (filenames, link at the bottom of the page) come from the package.json "source" attribute. --- index.html | 8 +------- src/app.js | 12 ++++++++++++ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/index.html b/index.html index 56f26bc0..ceea207d 100644 --- a/index.html +++ b/index.html @@ -33,13 +33,7 @@ diff --git a/src/app.js b/src/app.js index 5cb1de93..1ff60042 100644 --- a/src/app.js +++ b/src/app.js @@ -42,7 +42,19 @@ function refreshBackend(backend) { $('#periodo-logo').attr('href', '#p/' + backend.name + '/'); } +function initVersion() { + var version = require('../package.json').version; + version = 'v' + version; + $('#version-number').html(` + PeriodO client + + ${version} + + `); +} + $(document).ready(function () { + initVersion(); var router = Backbone._app = new ApplicationRouter(); var spinner = new Spinner({ lines: 12,