File tree Expand file tree Collapse file tree 6 files changed +107
-14
lines changed Expand file tree Collapse file tree 6 files changed +107
-14
lines changed Original file line number Diff line number Diff line change 22VUE_APP_PACKAGE_JSON = ' '
33
44# TAG must be corresponding with the version tag in package.json, need to modify it when new version releases
5- TAG = 0.1.2
5+ TAG = 1.0.0
Original file line number Diff line number Diff line change 1+ # [ 1.0.0] ( https://github.com/johnnymillergh/vuetify-typescript-playground/compare/v0.1.2...v1.0.0 ) (2019-12-30)
2+
3+
4+ ### Features
5+
6+ * ** $App:** add AppUtil for getting package.json information ([ 566e956] ( https://github.com/johnnymillergh/vuetify-typescript-playground/commit/566e95687c7db1283473806653c90dba6c8d76f3 ) )
7+
8+
9+ ### BREAKING CHANGES
10+
11+ * ** $App:** add AppUtil for getting package.json information
12+
13+
14+
115## [ 0.1.2] ( https://github.com/johnnymillergh/vuetify-typescript-playground/compare/v0.1.1...v0.1.2 ) (2019-12-30)
216
317
Original file line number Diff line number Diff line change 1- ![ TypeScript Playground Feature Graphics] ( https://raw.githubusercontent.com/johnnymillergh/MaterialLibrary/master/vuetiify -typescript-playground/vuetify-typescript-playground-blue-background.png )
1+ ![ TypeScript Playground Feature Graphics] ( https://raw.githubusercontent.com/johnnymillergh/MaterialLibrary/master/vuetify -typescript-playground/vuetify-typescript-playground-blue-background.png )
22
3- [ ![ GitHub release] ( https://img.shields.io/github/release/johnnymillergh/vuetify-typescript-playground.svg )] ( https://github.com/johnnymillergh/vuetiify -typescript-playground/releases )
3+ [ ![ GitHub release] ( https://img.shields.io/github/release/johnnymillergh/vuetify-typescript-playground.svg )] ( https://github.com/johnnymillergh/vuetify -typescript-playground/releases )
44[ ![ Build Status] ( https://travis-ci.com/johnnymillergh/vuetify-typescript-playground.svg?branch=master )] ( https://travis-ci.com/johnnymillergh/typescript-playground )
55[ ![ GitHub issues] ( https://img.shields.io/github/issues/johnnymillergh/vuetify-typescript-playground )] ( https://github.com/johnnymillergh/vuetify-typescript-playground/issues )
6- [ ![ GitHub forks] ( https://img.shields.io/github/forks/johnnymillergh/vuetiify-typescript-playground )] ( https://github.com/johnnymillergh/vuetiify -typescript-playground/network )
7- [ ![ GitHub stars] ( https://img.shields.io/github/stars/johnnymillergh/vuetiify-typescript-playground )] ( https://github.com/johnnymillergh/vuetiify -typescript-playground/stargazers )
8- [ ![ GitHub license] ( https://img.shields.io/github/license/johnnymillergh/vuetiify-typescript-playground )] ( https://github.com/johnnymillergh/vuetiify -typescript-playground/blob/master/LICENSE )
9- [ ![ Twitter] ( https://img.shields.io/twitter/url/https/github.com/johnnymillergh/vuetiify-typescript-playground?style=social )] ( https://twitter.com/intent/tweet?text=Wow:&url=https%3A%2F%2Fgithub.com%2Fjohnnymillergh%2Fvuetiify -typescript-playground )
6+ [ ![ GitHub forks] ( https://img.shields.io/github/forks/johnnymillergh/vuetiify-typescript-playground )] ( https://github.com/johnnymillergh/vuetify -typescript-playground/network )
7+ [ ![ GitHub stars] ( https://img.shields.io/github/stars/johnnymillergh/vuetiify-typescript-playground )] ( https://github.com/johnnymillergh/vuetify -typescript-playground/stargazers )
8+ [ ![ GitHub license] ( https://img.shields.io/github/license/johnnymillergh/vuetiify-typescript-playground )] ( https://github.com/johnnymillergh/vuetify -typescript-playground/blob/master/LICENSE )
9+ [ ![ Twitter] ( https://img.shields.io/twitter/url/https/github.com/johnnymillergh/vuetiify-typescript-playground?style=social )] ( https://twitter.com/intent/tweet?text=Wow:&url=https%3A%2F%2Fgithub.com%2Fjohnnymillergh%2Fvuetify -typescript-playground )
1010
1111# Vuetify TypeScript Playground
1212
Original file line number Diff line number Diff line change 11{
22 "name" : " vuetify-typescript-playground" ,
3- "version" : " 0.1.2 " ,
3+ "version" : " 1.0.0 " ,
44 "license" : " Apache-2.0" ,
55 "description" : " Vuetify Typescript Playground" ,
66 "author" : {
Original file line number Diff line number Diff line change 11<template >
2- <v-app >
2+ <v-app id = " app-container " >
33 <v-app-bar app color =" primary" dark >
44 <div class =" d-flex align-center" >
55 <v-img alt =" Vuetify Logo" class =" shrink mr-2" contain
66 src =" https://cdn.vuetifyjs.com/images/logos/vuetify-logo-dark.png" transition =" scale-transition"
77 width =" 40" />
8- <v-img alt =" Vuetify Name" class =" shrink mt-1 hidden-sm-and-down" contain min-width =" 100"
9- src =" https://cdn.vuetifyjs.com/images/logos/vuetify-name-dark.png" width =" 100" />
8+ <span id =" app-name" >{{ appName }}</span >
9+ <span id =" version" >{{ version }}</span >
10+ <span id =" environment" >{{ environment }}</span >
1011 </div >
1112 <v-spacer />
1213 <v-btn href =" https://github.com/vuetifyjs/vuetify/releases/latest" target =" _blank" text >
2930
3031<script lang="ts">
3132import Vue from ' vue'
33+ import { AppUtil } from ' @/utils/app-util.ts'
3234
3335export default Vue .extend ({
3436 name: ' App' ,
3537 data : () => ({
36- //
37- })
38+ appName: ' ' ,
39+ version: ' ' ,
40+ environment: ' '
41+ }),
42+ mounted (): void {
43+ this .appName = AppUtil .getName ()
44+ .replace (/ -/ g , ' ' )
45+ .split (' ' )
46+ .map (word => word [0 ].toUpperCase () + word .substr (1 ).toLowerCase ())
47+ .join (' ' )
48+ this .version = AppUtil .getVersionInfo ()
49+ this .environment = ` Environment: ${process .env .NODE_ENV } (${process .env .VUE_APP_ENV }) `
50+ }
3851})
3952 </script >
4053
4154<!-- suppress CssUnusedSymbol -->
42- <style scoped>
55+ <style lang="scss" scoped>
4356.fade-transform-leave-active , .fade-transform-enter-active {
4457 transition : all .5s ;
4558}
@@ -53,4 +66,26 @@ export default Vue.extend({
5366 opacity : 0 ;
5467 transform : translateX (30px );
5568}
69+
70+ #app-container {
71+ #app-name {
72+ font-size : 32px ;
73+ font-weight : bold ;
74+ }
75+
76+ #version {
77+ text-align : right ;
78+ font-size : 32px ;
79+ position : relative ;
80+ left : 8px ;
81+ }
82+
83+ #environment {
84+ text-align : right ;
85+ font-size : 18px ;
86+ position : relative ;
87+ top : 4px ;
88+ left : 16px ;
89+ }
90+ }
5691 </style >
Original file line number Diff line number Diff line change 1+ export class AppUtil {
2+ private static PROJECT_PROPERTY = JSON . parse ( unescape ( process . env . VUE_APP_PACKAGE_JSON ) )
3+
4+ /**
5+ * Get project property object.
6+ * @author Johnny Miller (鍾俊), e-mail: johnnysviva@outlook.com
7+ * @return {any } An object contains project properties.
8+ */
9+ static getProjectProperty = ( ) : Object => {
10+ return AppUtil . PROJECT_PROPERTY
11+ }
12+
13+ /**
14+ * Get the name of app.
15+ * @return {String } Name of app
16+ */
17+ static getName = ( ) : string => {
18+ return AppUtil . PROJECT_PROPERTY . name
19+ }
20+
21+ /**
22+ * Get the version of app.
23+ * @return {String } Version of app
24+ */
25+ static getVersionInfo = ( ) : string => {
26+ return AppUtil . PROJECT_PROPERTY . version
27+ }
28+
29+ /**
30+ * Get the description of app.
31+ * @return {String } Description of app
32+ */
33+ static getDescription = ( ) : string => {
34+ return AppUtil . PROJECT_PROPERTY . description
35+ }
36+
37+ /**
38+ * Get the author of app.
39+ * @return {String } Author of app
40+ */
41+ static getAuthor = ( ) : string => {
42+ return AppUtil . PROJECT_PROPERTY . author
43+ }
44+ }
You can’t perform that action at this time.
0 commit comments