Add version console log
This commit is contained in:
parent
a4ec4c6790
commit
b210f63638
@ -52,6 +52,8 @@ if(splash) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.info(`LiveAtlas version ${store.state.version}`);
|
||||||
|
|
||||||
const app = createApp(App).use(store);
|
const app = createApp(App).use(store);
|
||||||
|
|
||||||
// app.config.performance = true;
|
// app.config.performance = true;
|
||||||
|
@ -25,6 +25,7 @@ import {
|
|||||||
import {DynmapProjection} from "@/leaflet/projection/DynmapProjection";
|
import {DynmapProjection} from "@/leaflet/projection/DynmapProjection";
|
||||||
|
|
||||||
export type State = {
|
export type State = {
|
||||||
|
version: string;
|
||||||
configuration: DynmapServerConfig;
|
configuration: DynmapServerConfig;
|
||||||
messages: DynmapMessageConfig;
|
messages: DynmapMessageConfig;
|
||||||
components: DynmapComponentConfig;
|
components: DynmapComponentConfig;
|
||||||
@ -55,6 +56,8 @@ export type State = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const state: State = {
|
export const state: State = {
|
||||||
|
version: process.env.PACKAGE_VERSION || 'Unknown',
|
||||||
|
|
||||||
configuration: {
|
configuration: {
|
||||||
version: '',
|
version: '',
|
||||||
allowChat: false,
|
allowChat: false,
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
const
|
||||||
|
webpack = require('webpack'),
|
||||||
|
fs = require('fs'),
|
||||||
|
packageJson = fs.readFileSync('./package.json'),
|
||||||
|
version = JSON.parse(packageJson).version || 'Unknown';
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
publicPath: '',
|
publicPath: '',
|
||||||
assetsDir: 'live-atlas',
|
assetsDir: 'live-atlas',
|
||||||
@ -11,6 +17,16 @@ module.exports = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
configureWebpack: {
|
||||||
|
plugins: [
|
||||||
|
new webpack.DefinePlugin({
|
||||||
|
'process.env': {
|
||||||
|
PACKAGE_VERSION: '"' + version + '"'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
]
|
||||||
|
},
|
||||||
|
|
||||||
chainWebpack: config => {
|
chainWebpack: config => {
|
||||||
config.plugin('html')
|
config.plugin('html')
|
||||||
.tap(args => {
|
.tap(args => {
|
||||||
|
Loading…
Reference in New Issue
Block a user