Allow targeting different environments with deply. Add version string on the web App component.
This commit is contained in:
@ -1,3 +1,3 @@
|
||||
VUE_APP_PM_API_BASE=https://personal-measure.jdb-labs.com/api
|
||||
VUE_APP_PM_API_BASE=https://pm.jdb-labs.com/api
|
||||
VUE_APP_LOG_LEVEL=INFO
|
||||
VUE_APP_API_LOG_LEVEL=ERROR
|
||||
|
@ -1,4 +1,3 @@
|
||||
API_ADDR='localhost:8080'
|
||||
API_LOG_LEVEL='WARN'
|
||||
LOG_LEVEL='TRACE'
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"serve": "vue-cli-service serve",
|
||||
"build": "vue-cli-service build",
|
||||
"build": "vue-cli-service build --mode production",
|
||||
"build-dev": "vue-cli-service build --mode development",
|
||||
"lint": "vue-cli-service lint",
|
||||
"test:unit": "vue-cli-service test:unit"
|
||||
|
@ -13,6 +13,7 @@ const logger = logService.getLogger('/app');
|
||||
})
|
||||
export default class App extends Vue {
|
||||
|
||||
public version = process.env.PM_VERSION;
|
||||
private apiLogAppender!: ApiLogAppender;
|
||||
private consoleLogAppender!: ConsoleLogAppender;
|
||||
|
||||
|
@ -12,7 +12,7 @@ export class SimpleDetails extends Vue {
|
||||
@Prop() private measure!: Measure<MeasureConfig>;
|
||||
@Prop() private measurements!: Array<Measurement<MeasurementMeta>>;
|
||||
|
||||
private newMeasurement;
|
||||
// private newMeasurement;
|
||||
private moment = moment;
|
||||
private chartOptions = {
|
||||
noData: { text: 'no data',
|
||||
|
@ -1,3 +1,10 @@
|
||||
const merge = require('deepmerge');
|
||||
const VERSION = {
|
||||
'process.env': {
|
||||
PM_VERSION: JSON.stringify(require('./package.json').version)
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
devServer: {
|
||||
proxy: {
|
||||
@ -17,5 +24,11 @@ module.exports = {
|
||||
analyzerMode: 'static',
|
||||
openAnalyzer: false
|
||||
}
|
||||
},
|
||||
|
||||
chainWebpack: config => {
|
||||
config
|
||||
.plugin('define')
|
||||
.tap(args => merge(args, [VERSION]))
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user