From 939b715cd54eb826b38fc92aebbc46702653d31d Mon Sep 17 00:00:00 2001 From: Settel Date: Wed, 9 Mar 2022 09:15:17 +0100 Subject: [PATCH] feat: display version on start page footer --- client/nuxt.config.js | 5 +++++ client/package.json | 2 +- client/src/pages/index.vue | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/client/nuxt.config.js b/client/nuxt.config.js index 726b626..b1dc13d 100644 --- a/client/nuxt.config.js +++ b/client/nuxt.config.js @@ -1,3 +1,7 @@ +const fs = require('fs') +const packageJson = fs.readFileSync('./package.json') +const version = JSON.parse(packageJson).version || 0 + export default { ssr: false, srcDir: 'src/', @@ -22,6 +26,7 @@ export default { axios: { proxy: true }, publicRuntimeConfig: { serverBaseUrl: '/', + version, }, proxy: { '/api/': 'http://localhost:32039', diff --git a/client/package.json b/client/package.json index 5ba605d..bab7ab4 100644 --- a/client/package.json +++ b/client/package.json @@ -1,6 +1,6 @@ { "name": "knowyt", - "version": "1.0.0", + "version": "1.0.1", "private": true, "scripts": { "dev": "nuxt", diff --git a/client/src/pages/index.vue b/client/src/pages/index.vue index 7b9fea3..e0cef1f 100644 --- a/client/src/pages/index.vue +++ b/client/src/pages/index.vue @@ -5,7 +5,7 @@