added autodection of current version
This commit is contained in:
parent
a1db774767
commit
cdc81508e2
|
@ -1,6 +1,6 @@
|
|||
<div class="panel">
|
||||
<h3 class="panel__title">settings</h3>
|
||||
|
||||
<p class="version">Sengi version: 0.8.0</p>
|
||||
<p class="version">Sengi version: {{version}}</p>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -1,15 +1,24 @@
|
|||
import { Component, OnInit } from '@angular/core';
|
||||
const { version: appVersion } = require('../../../../../package.json')
|
||||
|
||||
@Component({
|
||||
selector: 'app-settings',
|
||||
templateUrl: './settings.component.html',
|
||||
styleUrls: ['./settings.component.scss']
|
||||
selector: 'app-settings',
|
||||
templateUrl: './settings.component.html',
|
||||
styleUrls: ['./settings.component.scss']
|
||||
})
|
||||
export class SettingsComponent implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
version: string;
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
constructor() { }
|
||||
|
||||
ngOnInit() {
|
||||
this.version = environment.VERSION;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
export const environment = {
|
||||
VERSION: require('../../../../../package.json').version
|
||||
};
|
|
@ -4,7 +4,7 @@
|
|||
"outDir": "../out-tsc/app",
|
||||
"baseUrl": "./",
|
||||
"module": "es2015",
|
||||
"types": []
|
||||
"types": ["node"]
|
||||
},
|
||||
"exclude": [
|
||||
"test.ts",
|
||||
|
|
Loading…
Reference in New Issue