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

Commit f4c1736

Browse files
fix: locale location (js/ts)
1 parent 7a20b5a commit f4c1736

File tree

3 files changed

+66
-122
lines changed

3 files changed

+66
-122
lines changed
Lines changed: 60 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,60 @@
1-
import Vue from 'vue'
2-
<%_ if (useAlaCarte) { _%>
3-
import {
4-
Vuetify,
5-
VApp,
6-
VNavigationDrawer,
7-
VFooter,
8-
VList,
9-
VBtn,
10-
VIcon,
11-
VGrid,
12-
VToolbar,
13-
transitions
14-
} from 'vuetify'
15-
import 'vuetify/src/stylus/app.styl'
16-
<%_ } else { _%>
17-
import Vuetify from 'vuetify'
18-
import 'vuetify/dist/vuetify.min.css'
19-
<%_ } _%>
20-
<%_ if (locale !== 'en') { _%>
21-
import <%= locale.replace(/-/g, '') %> from 'vuetify/src/locale/<%= locale %>'
22-
<%_ } _%>
23-
24-
Vue.use(Vuetify, {
25-
<%_ if (useAlaCarte) { _%>
26-
components: {
27-
VApp,
28-
VNavigationDrawer,
29-
VFooter,
30-
VList,
31-
VBtn,
32-
VIcon,
33-
VGrid,
34-
VToolbar,
35-
transitions
36-
},
37-
<%_ } _%>
38-
<%_ if (useTheme) { _%>
39-
theme: {
40-
primary: '#ee44aa',
41-
secondary: '#424242',
42-
accent: '#82B1FF',
43-
error: '#FF5252',
44-
info: '#2196F3',
45-
success: '#4CAF50',
46-
warning: '#FFC107'
47-
},
48-
<%_ } _%>
49-
<%_ if (useCustomProperties) { _%>
50-
customProperties: true,
51-
<%_ } _%>
52-
iconfont: '<%= iconFont %>',
53-
<%_ if (locale !== 'en') { _%>
54-
lang: {
55-
locales: { <%= locale.replace(/-/g, '') %> },
56-
current: '<%= locale %>'
57-
},
58-
<%_ } _%>
59-
})
60-
1+
import Vue from 'vue'
2+
<%_ if (useAlaCarte) { _%>
3+
import {
4+
Vuetify,
5+
VApp,
6+
VNavigationDrawer,
7+
VFooter,
8+
VList,
9+
VBtn,
10+
VIcon,
11+
VGrid,
12+
VToolbar,
13+
transitions
14+
} from 'vuetify'
15+
import 'vuetify/src/stylus/app.styl'
16+
<%_ } else { _%>
17+
import Vuetify from 'vuetify'
18+
import 'vuetify/dist/vuetify.min.css'
19+
<%_ } _%>
20+
<%_ if (locale !== 'en') { _%>
21+
import <%= locale.replace(/-/g, '') %> from 'vuetify/<%= typescript ? 'src' : 'es5' %>/locale/<%= locale %>'
22+
<%_ } _%>
23+
24+
Vue.use(Vuetify, {
25+
<%_ if (useAlaCarte) { _%>
26+
components: {
27+
VApp,
28+
VNavigationDrawer,
29+
VFooter,
30+
VList,
31+
VBtn,
32+
VIcon,
33+
VGrid,
34+
VToolbar,
35+
transitions
36+
},
37+
<%_ } _%>
38+
<%_ if (useTheme) { _%>
39+
theme: {
40+
primary: '#ee44aa',
41+
secondary: '#424242',
42+
accent: '#82B1FF',
43+
error: '#FF5252',
44+
info: '#2196F3',
45+
success: '#4CAF50',
46+
warning: '#FFC107'
47+
},
48+
<%_ } _%>
49+
<%_ if (useCustomProperties) { _%>
50+
customProperties: true,
51+
<%_ } _%>
52+
iconfont: '<%= iconFont %>',
53+
<%_ if (locale !== 'en') { _%>
54+
lang: {
55+
locales: { <%= locale.replace(/-/g, '') %> },
56+
current: '<%= locale %>'
57+
},
58+
<%_ } _%>
59+
})
60+

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

Lines changed: 0 additions & 60 deletions
This file was deleted.

generator/tools/vuetify.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,13 @@ function addDependencies (api) {
1010

1111
function renderFiles (api, opts) {
1212
const pluginFilename = api.hasPlugin('typescript') ? 'vuetify.ts' : 'vuetify.js'
13+
const pluginSourceFilename = 'vuetify.js'
1314
api.render({
14-
[`./src/plugins/${pluginFilename}`]: `../templates/default/src/plugins/${pluginFilename}`
15-
}, opts)
15+
[`./src/plugins/${pluginFilename}`]: `../templates/default/src/plugins/${pluginSourceFilename}`
16+
}, {
17+
...opts,
18+
typescript: api.hasPlugin('typescript')
19+
})
1620

1721
// Render files if we're replacing
1822
const fs = require('fs')

0 commit comments

Comments
 (0)