Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Commit f735b63

Browse files
ricardogobbosouzaclarkdo
authored andcommitted
feat: upgrade vuetify to 2.x (#297)
1 parent 54c29ff commit f735b63

File tree

10 files changed

+57
-67
lines changed

10 files changed

+57
-67
lines changed

template/_package.json

+1-4
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,6 @@
7373
<%_ if (ui === 'bootstrap') { _%>
7474
"bootstrap-vue": "^2.0.0-rc.11",
7575
"bootstrap": "^4.1.3",
76-
<%_ } else if (ui === 'vuetify') { _%>
77-
"@nuxtjs/vuetify": "0.5.5",
7876
<%_ } else if (ui === 'bulma') { _%>
7977
"@nuxtjs/bulma": "^1.2.1",
8078
<%_ } else if (ui === 'element-ui') { _%>
@@ -105,8 +103,7 @@
105103
<%_ if (ui === 'tailwind') { _%>
106104
"@nuxtjs/tailwindcss": "^1.0.0",
107105
<%_ } else if (ui === 'vuetify') { _%>
108-
"stylus": "^0.54.5",
109-
"stylus-loader": "^3.0.2",
106+
"@nuxtjs/vuetify": "^1.0.0",
110107
<%_ } _%>
111108
<%_ if (eslint) { _%>
112109
"@nuxtjs/eslint-config": "^1.0.1",

template/frameworks/vuetify/assets/style/app.styl

-2
This file was deleted.

template/frameworks/vuetify/assets/style/variables.styl

-1
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
$font-size-root: 20px;

template/frameworks/vuetify/layouts/default.vue

+22-22
Original file line numberDiff line numberDiff line change
@@ -8,55 +8,55 @@
88
app
99
>
1010
<v-list>
11-
<v-list-tile
11+
<v-list-item
1212
v-for="(item, i) in items"
1313
:key="i"
1414
:to="item.to"
1515
router
1616
exact
1717
>
18-
<v-list-tile-action>
18+
<v-list-item-action>
1919
<v-icon>{{ item.icon }}</v-icon>
20-
</v-list-tile-action>
21-
<v-list-tile-content>
22-
<v-list-tile-title v-text="item.title" />
23-
</v-list-tile-content>
24-
</v-list-tile>
20+
</v-list-item-action>
21+
<v-list-item-content>
22+
<v-list-item-title v-text="item.title" />
23+
</v-list-item-content>
24+
</v-list-item>
2525
</v-list>
2626
</v-navigation-drawer>
27-
<v-toolbar
27+
<v-app-bar
2828
:clipped-left="clipped"
2929
fixed
3030
app
3131
>
32-
<v-toolbar-side-icon @click="drawer = !drawer" />
32+
<v-app-bar-nav-icon @click.stop="drawer = !drawer" />
3333
<v-btn
3434
icon
3535
@click.stop="miniVariant = !miniVariant"
3636
>
37-
<v-icon>{{ `chevron_${miniVariant ? 'right' : 'left'}` }}</v-icon>
37+
<v-icon>mdi-{{ `chevron-${miniVariant ? 'right' : 'left'}` }}</v-icon>
3838
</v-btn>
3939
<v-btn
4040
icon
4141
@click.stop="clipped = !clipped"
4242
>
43-
<v-icon>web</v-icon>
43+
<v-icon>mdi-application</v-icon>
4444
</v-btn>
4545
<v-btn
4646
icon
4747
@click.stop="fixed = !fixed"
4848
>
49-
<v-icon>remove</v-icon>
49+
<v-icon>mdi-minus</v-icon>
5050
</v-btn>
5151
<v-toolbar-title v-text="title" />
5252
<v-spacer />
5353
<v-btn
5454
icon
5555
@click.stop="rightDrawer = !rightDrawer"
5656
>
57-
<v-icon>menu</v-icon>
57+
<v-icon>mdi-menu</v-icon>
5858
</v-btn>
59-
</v-toolbar>
59+
</v-app-bar>
6060
<v-content>
6161
<v-container>
6262
<nuxt />
@@ -69,14 +69,14 @@
6969
fixed
7070
>
7171
<v-list>
72-
<v-list-tile @click.native="right = !right">
73-
<v-list-tile-action>
72+
<v-list-item @click.native="right = !right">
73+
<v-list-item-action>
7474
<v-icon light>
75-
compare_arrows
75+
mdi-repeat
7676
</v-icon>
77-
</v-list-tile-action>
78-
<v-list-tile-title>Switch drawer (click me)</v-list-tile-title>
79-
</v-list-tile>
77+
</v-list-item-action>
78+
<v-list-item-title>Switch drawer (click me)</v-list-item-title>
79+
</v-list-item>
8080
</v-list>
8181
</v-navigation-drawer>
8282
<v-footer
@@ -97,12 +97,12 @@ export default {
9797
fixed: false,
9898
items: [
9999
{
100-
icon: 'apps',
100+
icon: 'mdi-apps',
101101
title: 'Welcome',
102102
to: '/'
103103
},
104104
{
105-
icon: 'bubble_chart',
105+
icon: 'mdi-chart-bubble',
106106
title: 'Inspire',
107107
to: '/inspire'
108108
}

template/frameworks/vuetify/pages/index.vue

+1-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
sm8
1010
md6
1111
>
12-
<div class="text-xs-center">
12+
<div class="text-center">
1313
<logo />
1414
<vuetify-logo />
1515
</div>
@@ -68,7 +68,6 @@
6868
<v-spacer />
6969
<v-btn
7070
color="primary"
71-
flat
7271
nuxt
7372
to="/inspire"
7473
>

template/frameworks/vuetify/pages/inspire.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<v-layout>
3-
<v-flex text-xs-center>
3+
<v-flex class="text-center">
44
<img
55
src="/v.png"
66
alt="Vuetify.js"

template/nuxt/nuxt.config.js

+15-16
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,6 @@ module.exports = {
3636
],
3737
link: [
3838
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
39-
<%_ if (ui === 'vuetify') { _%>,
40-
{
41-
rel: 'stylesheet',
42-
href:
43-
'https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Material+Icons'
44-
}
45-
<%_ } _%>
4639
]
4740
},
4841
/*
@@ -86,6 +79,8 @@ module.exports = {
8679
<%_ if (ui === 'tailwind') { _%>
8780
// Doc: https://github.com/nuxt-community/nuxt-tailwindcss
8881
'@nuxtjs/tailwindcss',
82+
<%_ } else if (ui === 'vuetify') { _%>
83+
'@nuxtjs/vuetify',
8984
<%_ } _%>
9085
],
9186
/*
@@ -101,8 +96,6 @@ module.exports = {
10196
<%_ } else if (ui === 'buefy') { _%>
10297
// Doc: https://buefy.github.io/#/documentation
10398
'nuxt-buefy',
104-
<%_ } else if (ui === 'vuetify') { _%>
105-
'@nuxtjs/vuetify',
10699
<%_ } _%>
107100
<%_ if (axios) { _%>
108101
// Doc: https://axios.nuxtjs.org/usage
@@ -126,14 +119,20 @@ module.exports = {
126119
** https://github.com/nuxt-community/vuetify-module
127120
*/
128121
vuetify: {
122+
customVariables: ['~/assets/variables.scss'],
129123
theme: {
130-
primary: colors.blue.darken2,
131-
accent: colors.grey.darken3,
132-
secondary: colors.amber.darken3,
133-
info: colors.teal.lighten1,
134-
warning: colors.amber.base,
135-
error: colors.deepOrange.accent4,
136-
success: colors.green.accent3
124+
dark: true,
125+
themes: {
126+
dark: {
127+
primary: colors.blue.darken2,
128+
accent: colors.grey.darken3,
129+
secondary: colors.amber.darken3,
130+
info: colors.teal.lighten1,
131+
warning: colors.amber.base,
132+
error: colors.deepOrange.accent4,
133+
success: colors.green.accent3
134+
}
135+
}
137136
}
138137
},
139138
<%_ } _%>

test/snapshots/index.test.js.md

+16-19
Original file line numberDiff line numberDiff line change
@@ -2992,8 +2992,7 @@ Generated by [AVA](https://ava.li).
29922992
'.gitignore',
29932993
'README.md',
29942994
'assets/README.md',
2995-
'assets/style/app.styl',
2996-
'assets/style/variables.styl',
2995+
'assets/variables.scss',
29972996
'components/Logo.vue',
29982997
'components/README.md',
29992998
'components/VuetifyLogo.vue',
@@ -3017,13 +3016,11 @@ Generated by [AVA](https://ava.li).
30173016
30183017
{
30193018
dependencies: {
3020-
'@nuxtjs/vuetify': '0.5.5',
30213019
nuxt: '^2.0.0',
30223020
},
30233021
devDependencies: {
3022+
'@nuxtjs/vuetify': '^1.0.0',
30243023
nodemon: '^1.18.9',
3025-
stylus: '^0.54.5',
3026-
'stylus-loader': '^3.0.2',
30273024
},
30283025
private: true,
30293026
scripts: {
@@ -3053,12 +3050,6 @@ Generated by [AVA](https://ava.li).
30533050
],␊
30543051
link: [␊
30553052
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }␊
3056-
,␊
3057-
{␊
3058-
rel: 'stylesheet',␊
3059-
href:␊
3060-
'https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Material+Icons'␊
3061-
}␊
30623053
]␊
30633054
},␊
30643055
/*␊
@@ -3079,26 +3070,32 @@ Generated by [AVA](https://ava.li).
30793070
** Nuxt.js dev-modules␊
30803071
*/␊
30813072
devModules: [␊
3073+
'@nuxtjs/vuetify',␊
30823074
],␊
30833075
/*␊
30843076
** Nuxt.js modules␊
30853077
*/␊
30863078
modules: [␊
3087-
'@nuxtjs/vuetify',␊
30883079
],␊
30893080
/*␊
30903081
** vuetify module configuration␊
30913082
** https://github.com/nuxt-community/vuetify-module␊
30923083
*/␊
30933084
vuetify: {␊
3085+
customVariables: ['~/assets/variables.scss'],␊
30943086
theme: {␊
3095-
primary: colors.blue.darken2,␊
3096-
accent: colors.grey.darken3,␊
3097-
secondary: colors.amber.darken3,␊
3098-
info: colors.teal.lighten1,␊
3099-
warning: colors.amber.base,␊
3100-
error: colors.deepOrange.accent4,␊
3101-
success: colors.green.accent3␊
3087+
dark: true,␊
3088+
themes: {␊
3089+
dark: {␊
3090+
primary: colors.blue.darken2,␊
3091+
accent: colors.grey.darken3,␊
3092+
secondary: colors.amber.darken3,␊
3093+
info: colors.teal.lighten1,␊
3094+
warning: colors.amber.base,␊
3095+
error: colors.deepOrange.accent4,␊
3096+
success: colors.green.accent3␊
3097+
}␊
3098+
}␊
31023099
}␊
31033100
},␊
31043101
/*␊

test/snapshots/index.test.js.snap

-67 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)