Skip to content

Commit b7a7351

Browse files
committed
refactor(templates): clean-up file structure and process
1 parent ca0a0b4 commit b7a7351

File tree

7 files changed

+46
-11
lines changed

7 files changed

+46
-11
lines changed

generator/templates/default/src/App.js.vue

+2
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,12 @@ import HelloWorld from './components/HelloWorld';
6262
6363
export default {
6464
name: 'App',
65+
6566
<%_ if (!opts.router) { _%>
6667
components: {
6768
HelloWorld,
6869
},
70+
6971
<%_ } _%>
7072
data: () => ({
7173
//

generator/templates/default/src/App.ts.vue

+34-11
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,52 @@
11
<template>
22
<v-app>
3-
<v-app-bar app>
4-
<v-toolbar-title class="headline text-uppercase">
5-
<span>Vuetify</span>
6-
<span class="font-weight-light">MATERIAL DESIGN</span>
7-
</v-toolbar-title>
3+
<v-app-bar
4+
app
5+
color="primary"
6+
dark
7+
>
8+
<div class="d-flex align-center">
9+
<v-img
10+
alt="Vuetify Logo"
11+
class="shrink mr-2"
12+
contain
13+
src="https://cdn.vuetifyjs.com/images/logos/vuetify-logo-dark.png"
14+
transition="scale-transition"
15+
width="40"
16+
/>
17+
18+
<v-img
19+
alt="Vuetify Name"
20+
class="shrink mt-1 hidden-sm-and-down"
21+
contain
22+
min-width="100"
23+
src="https://cdn.vuetifyjs.com/images/logos/vuetify-name-dark.png"
24+
width="100"
25+
/>
26+
</div>
27+
828
<v-spacer></v-spacer>
29+
930
<v-btn
10-
text
1131
href="https://github.com/vuetifyjs/vuetify/releases/latest"
1232
target="_blank"
33+
text
1334
>
1435
<span class="mr-2">Latest Release</span>
15-
<%_ if (options.iconFont === 'mdi') { _%>
36+
<%_ if (opts.iconFont === 'mdi') { _%>
1637
<v-icon>mdi-open-in-new</v-icon>
17-
<%_ } else if (options.iconFont === 'md') { _%>
38+
<%_ } else if (opts.iconFont === 'md') { _%>
1839
<v-icon>open_in_new</v-icon>
19-
<%_ } else if (options.iconFont === 'fa') { _%>
40+
<%_ } else if (opts.iconFont === 'fa') { _%>
2041
<v-icon>fas fa-external-link-alt</v-icon>
21-
<%_ } else if (options.iconFont === 'fa4') { _%>
42+
<%_ } else if (opts.iconFont === 'fa4') { _%>
2243
<v-icon>fa-external-link</v-icon>
2344
<%_ } _%>
2445
</v-btn>
2546
</v-app-bar>
2647

2748
<v-content>
28-
<%_ if (options.router) { _%>
49+
<%_ if (opts.router) { _%>
2950
<router-view/>
3051
<%_ } else { _%>
3152
<HelloWorld/>
@@ -42,10 +63,12 @@ import HelloWorld from './components/HelloWorld.vue';
4263
4364
export default Vue.extend({
4465
name: 'App',
66+
4567
<%_ if (!options.router) { _%>
4668
components: {
4769
HelloWorld,
4870
},
71+
4972
<%_ } _%>
5073
data: () => ({
5174
//

generator/templates/default/src/components/HelloWorld.js.vue

+2
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@
8686

8787
<script>
8888
export default {
89+
name: 'HelloWorld',
90+
8991
data: () => ({
9092
ecosystem: [
9193
{

generator/templates/default/src/components/HelloWorld.ts.vue

+2
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@
8888
import Vue from 'vue';
8989
9090
export default Vue.extend({
91+
name: 'HelloWorld',
92+
9193
data: () => ({
9294
ecosystem: [
9395
{

generator/templates/default/src/plugins/vuetify.js

+2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ export default new Vuetify({
3838
current: '<%= locale %>',
3939
},
4040
<%_ } _%>
41+
<%_ if (opts.iconFont !== 'mdi') { _%>
4142
icons: {
4243
iconfont: '<%= opts.iconFont %>',
4344
},
45+
<%_ } _%>
4446
});

generator/templates/default/src/views/Home.js.vue

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
import HelloWorld from '../components/HelloWorld';
77
88
export default {
9+
name: 'Home',
10+
911
components: {
1012
HelloWorld,
1113
},

generator/templates/default/src/views/Home.ts.vue

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ import Vue from 'vue';
77
import HelloWorld from '../components/HelloWorld.vue';
88
99
export default Vue.extend({
10+
name: 'Home',
11+
1012
components: {
1113
HelloWorld,
1214
},

0 commit comments

Comments
 (0)