From b1b9fdf2513b5791bc1eb27ee057ea3ff02214b3 Mon Sep 17 00:00:00 2001 From: Morteza Ziyae Date: Sat, 29 Jun 2019 21:08:17 +0430 Subject: [PATCH] read version from package.json --- src/store/index.ts | 4 ++++ src/views/Home.vue | 16 +++++++++++----- vue.config.js | 11 +++++++++++ 3 files changed, 26 insertions(+), 5 deletions(-) diff --git a/src/store/index.ts b/src/store/index.ts index fd18d9b..5e2b8e8 100644 --- a/src/store/index.ts +++ b/src/store/index.ts @@ -10,6 +10,7 @@ Vue.use(Vuex); const store = new Vuex.Store({ state: { + appVersion: JSON.parse(unescape(process.env.APP_VERSION)), diceResult: null, gameStatus: GameStatus.NOT_STARTED, boardStatus: BoardStatus.INITIALIZING, @@ -55,6 +56,9 @@ const store = new Vuex.Store({ }, boardWidth(state) { return state.boardWidth; + }, + appVersion(state) { + return state.appVersion } }, modules: { diff --git a/src/views/Home.vue b/src/views/Home.vue index e3120d3..95b5aaf 100644 --- a/src/views/Home.vue +++ b/src/views/Home.vue @@ -12,16 +12,22 @@ -