create-vuetify 2.4.0 → 2.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-vuetify",
3
- "version": "2.4.0",
3
+ "version": "2.5.2",
4
4
  "author": "Elijah Kotyluk <elijah@elijahkotyluk.com>",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -30,8 +30,9 @@
30
30
  "kolorist": "^1.8.0",
31
31
  "magicast": "^0.3.5",
32
32
  "minimist": "^1.2.8",
33
- "package-manager-detector": "^1.0.0",
33
+ "package-manager-detector": "^1.2.0",
34
34
  "prompts": "^2.4.2",
35
+ "tinyexec": "^1.0.1",
35
36
  "validate-npm-package-name": "^6.0.0"
36
37
  },
37
38
  "devDependencies": {
@@ -42,7 +43,7 @@
42
43
  "@types/validate-npm-package-name": "^4.0.2",
43
44
  "esbuild": "^0.25.1",
44
45
  "eslint": "^9.23.0",
45
- "eslint-config-vuetify": "^3.0.3",
46
+ "eslint-config-vuetify": "4.0.0",
46
47
  "nypm": "^0.6.0",
47
48
  "release-it": "^18.1.2",
48
49
  "typescript": "^5.8.2"
@@ -1 +1,3 @@
1
- export { default } from 'eslint-config-vuetify'
1
+ import vuetify from 'eslint-config-vuetify'
2
+
3
+ export default vuetify()
@@ -4,7 +4,7 @@
4
4
  },
5
5
  "devDependencies": {
6
6
  "eslint": "^9.23.0",
7
- "eslint-config-vuetify": "^3.0.3",
7
+ "eslint-config-vuetify": "^4.0.0",
8
8
  "globals": "^16.0.0",
9
9
  "vue-router": "^4.5.0",
10
10
  "unplugin-vue-router": "^0.12.0"
@@ -16,12 +16,12 @@ const router = createRouter({
16
16
  // Workaround for https://github.com/vitejs/vite/issues/11804
17
17
  router.onError((err, to) => {
18
18
  if (err?.message?.includes?.('Failed to fetch dynamically imported module')) {
19
- if (!localStorage.getItem('vuetify:dynamic-reload')) {
19
+ if (localStorage.getItem('vuetify:dynamic-reload')) {
20
+ console.error('Dynamic import error, reloading page did not fix it', err)
21
+ } else {
20
22
  console.log('Reloading page to fix dynamic import error')
21
23
  localStorage.setItem('vuetify:dynamic-reload', 'true')
22
24
  location.assign(to.fullPath)
23
- } else {
24
- console.error('Dynamic import error, reloading page did not fix it', err)
25
25
  }
26
26
  } else {
27
27
  console.error(err)
@@ -2,7 +2,7 @@
2
2
  import Components from 'unplugin-vue-components/vite'
3
3
  import Vue from '@vitejs/plugin-vue'
4
4
  import Vuetify, { transformAssetUrls } from 'vite-plugin-vuetify'
5
- import ViteFonts from 'unplugin-fonts/vite'
5
+ import Fonts from 'unplugin-fonts/vite'
6
6
  import VueRouter from 'unplugin-vue-router/vite'
7
7
 
8
8
  // Utilities
@@ -24,12 +24,15 @@ export default defineConfig({
24
24
  },
25
25
  }),
26
26
  Components(),
27
- ViteFonts({
28
- google: {
29
- families: [{
30
- name: 'Roboto',
31
- styles: 'wght@100;300;400;500;700;900',
32
- }],
27
+ Fonts({
28
+ fontsource: {
29
+ families: [
30
+ {
31
+ name: 'Roboto',
32
+ weights: [100, 300, 400, 500, 700, 900],
33
+ styles: ['normal', 'italic'],
34
+ },
35
+ ],
33
36
  },
34
37
  }),
35
38
  ],
@@ -45,7 +48,7 @@ export default defineConfig({
45
48
  define: { 'process.env': {} },
46
49
  resolve: {
47
50
  alias: {
48
- '@': fileURLToPath(new URL('./src', import.meta.url)),
51
+ '@': fileURLToPath(new URL('src', import.meta.url)),
49
52
  },
50
53
  extensions: [
51
54
  '.js',
@@ -9,7 +9,7 @@
9
9
  },
10
10
  "dependencies": {
11
11
  "@mdi/font": "7.4.47",
12
- "roboto-fontface": "*",
12
+ "@fontsource/roboto": "5.2.5",
13
13
  "vue": "^3.5.13",
14
14
  "vuetify": "^3.8.1"
15
15
  },
@@ -22,4 +22,4 @@
22
22
  "vite-plugin-vuetify": "^2.1.1",
23
23
  "vite": "^6.2.2"
24
24
  }
25
- }
25
+ }
@@ -13,6 +13,9 @@ import App from './App.vue'
13
13
  // Composables
14
14
  import { createApp } from 'vue'
15
15
 
16
+ // Styles
17
+ import 'unfonts.css'
18
+
16
19
  const app = createApp(App)
17
20
 
18
21
  registerPlugins(app)
@@ -2,7 +2,7 @@
2
2
  import Components from 'unplugin-vue-components/vite'
3
3
  import Vue from '@vitejs/plugin-vue'
4
4
  import Vuetify, { transformAssetUrls } from 'vite-plugin-vuetify'
5
- import ViteFonts from 'unplugin-fonts/vite'
5
+ import Fonts from 'unplugin-fonts/vite'
6
6
 
7
7
  // Utilities
8
8
  import { defineConfig } from 'vite'
@@ -17,12 +17,15 @@ export default defineConfig({
17
17
  // https://github.com/vuetifyjs/vuetify-loader/tree/master/packages/vite-plugin#readme
18
18
  Vuetify(),
19
19
  Components(),
20
- ViteFonts({
21
- google: {
22
- families: [{
23
- name: 'Roboto',
24
- styles: 'wght@100;300;400;500;700;900',
25
- }],
20
+ Fonts({
21
+ fontsource: {
22
+ families: [
23
+ {
24
+ name: 'Roboto',
25
+ weights: [100, 300, 400, 500, 700, 900],
26
+ styles: ['normal', 'italic'],
27
+ },
28
+ ],
26
29
  },
27
30
  }),
28
31
  ],
@@ -32,7 +35,7 @@ export default defineConfig({
32
35
  define: { 'process.env': {} },
33
36
  resolve: {
34
37
  alias: {
35
- '@': fileURLToPath(new URL('./src', import.meta.url)),
38
+ '@': fileURLToPath(new URL('src', import.meta.url)),
36
39
  },
37
40
  extensions: [
38
41
  '.js',
@@ -53,7 +56,7 @@ export default defineConfig({
53
56
  api: 'modern-compiler',
54
57
  },
55
58
  scss: {
56
- api:'modern-compiler',
59
+ api: 'modern-compiler',
57
60
  },
58
61
  },
59
62
  },
@@ -17,12 +17,12 @@ const router = createRouter({
17
17
  // Workaround for https://github.com/vitejs/vite/issues/11804
18
18
  router.onError((err, to) => {
19
19
  if (err?.message?.includes?.('Failed to fetch dynamically imported module')) {
20
- if (!localStorage.getItem('vuetify:dynamic-reload')) {
20
+ if (localStorage.getItem('vuetify:dynamic-reload')) {
21
+ console.error('Dynamic import error, reloading page did not fix it', err)
22
+ } else {
21
23
  console.log('Reloading page to fix dynamic import error')
22
24
  localStorage.setItem('vuetify:dynamic-reload', 'true')
23
25
  location.assign(to.fullPath)
24
- } else {
25
- console.error('Dynamic import error, reloading page did not fix it', err)
26
26
  }
27
27
  } else {
28
28
  console.error(err)
@@ -41,7 +41,7 @@ export default defineConfig({
41
41
  'vue',
42
42
  VueRouterAutoImports,
43
43
  {
44
- 'pinia': ['defineStore', 'storeToRefs'],
44
+ pinia: ['defineStore', 'storeToRefs'],
45
45
  },
46
46
  ],
47
47
  eslintrc: {
@@ -62,7 +62,7 @@ export default defineConfig({
62
62
  define: { 'process.env': {} },
63
63
  resolve: {
64
64
  alias: {
65
- '@': fileURLToPath(new URL('./src', import.meta.url)),
65
+ '@': fileURLToPath(new URL('src', import.meta.url)),
66
66
  },
67
67
  extensions: [
68
68
  '.js',
@@ -1 +1,3 @@
1
- export { default } from 'eslint-config-vuetify/index.ts.mjs'
1
+ import vuetify from 'eslint-config-vuetify'
2
+
3
+ export default vuetify()
@@ -4,7 +4,7 @@
4
4
  },
5
5
  "devDependencies": {
6
6
  "eslint": "^9.23.0",
7
- "eslint-config-vuetify": "^3.0.3",
7
+ "eslint-config-vuetify": "^4.0.0",
8
8
  "vue-router": "^4.5.0",
9
9
  "unplugin-vue-router": "^0.12.0"
10
10
  }
@@ -16,12 +16,12 @@ const router = createRouter({
16
16
  // Workaround for https://github.com/vitejs/vite/issues/11804
17
17
  router.onError((err, to) => {
18
18
  if (err?.message?.includes?.('Failed to fetch dynamically imported module')) {
19
- if (!localStorage.getItem('vuetify:dynamic-reload')) {
19
+ if (localStorage.getItem('vuetify:dynamic-reload')) {
20
+ console.error('Dynamic import error, reloading page did not fix it', err)
21
+ } else {
20
22
  console.log('Reloading page to fix dynamic import error')
21
23
  localStorage.setItem('vuetify:dynamic-reload', 'true')
22
24
  location.assign(to.fullPath)
23
- } else {
24
- console.error('Dynamic import error, reloading page did not fix it', err)
25
25
  }
26
26
  } else {
27
27
  console.error(err)
@@ -2,7 +2,7 @@
2
2
  import Components from 'unplugin-vue-components/vite'
3
3
  import Vue from '@vitejs/plugin-vue'
4
4
  import Vuetify, { transformAssetUrls } from 'vite-plugin-vuetify'
5
- import ViteFonts from 'unplugin-fonts/vite'
5
+ import Fonts from 'unplugin-fonts/vite'
6
6
  import VueRouter from 'unplugin-vue-router/vite'
7
7
 
8
8
  // Utilities
@@ -12,7 +12,9 @@ import { fileURLToPath, URL } from 'node:url'
12
12
  // https://vitejs.dev/config/
13
13
  export default defineConfig({
14
14
  plugins: [
15
- VueRouter(),
15
+ VueRouter({
16
+ dts: 'src/typed-router.d.ts',
17
+ }),
16
18
  Vue({
17
19
  template: { transformAssetUrls },
18
20
  }),
@@ -23,13 +25,18 @@ export default defineConfig({
23
25
  configFile: 'src/styles/settings.scss',
24
26
  },
25
27
  }),
26
- Components(),
27
- ViteFonts({
28
- google: {
29
- families: [{
30
- name: 'Roboto',
31
- styles: 'wght@100;300;400;500;700;900',
32
- }],
28
+ Components({
29
+ dts: 'src/components.d.ts',
30
+ }),
31
+ Fonts({
32
+ fontsource: {
33
+ families: [
34
+ {
35
+ name: 'Roboto',
36
+ weights: [100, 300, 400, 500, 700, 900],
37
+ styles: ['normal', 'italic'],
38
+ },
39
+ ],
33
40
  },
34
41
  }),
35
42
  ],
@@ -45,7 +52,7 @@ export default defineConfig({
45
52
  define: { 'process.env': {} },
46
53
  resolve: {
47
54
  alias: {
48
- '@': fileURLToPath(new URL('./src', import.meta.url)),
55
+ '@': fileURLToPath(new URL('src', import.meta.url)),
49
56
  },
50
57
  extensions: [
51
58
  '.js',
@@ -11,7 +11,7 @@
11
11
  },
12
12
  "dependencies": {
13
13
  "@mdi/font": "7.4.47",
14
- "roboto-fontface": "*",
14
+ "@fontsource/roboto": "5.2.5",
15
15
  "vue": "^3.5.13",
16
16
  "vuetify": "^3.8.1"
17
17
  },
@@ -13,6 +13,9 @@ import App from './App.vue'
13
13
  // Composables
14
14
  import { createApp } from 'vue'
15
15
 
16
+ // Styles
17
+ import 'unfonts.css'
18
+
16
19
  const app = createApp(App)
17
20
 
18
21
  registerPlugins(app)
@@ -2,7 +2,7 @@
2
2
  import Components from 'unplugin-vue-components/vite'
3
3
  import Vue from '@vitejs/plugin-vue'
4
4
  import Vuetify, { transformAssetUrls } from 'vite-plugin-vuetify'
5
- import ViteFonts from 'unplugin-fonts/vite'
5
+ import Fonts from 'unplugin-fonts/vite'
6
6
 
7
7
  // Utilities
8
8
  import { defineConfig } from 'vite'
@@ -17,12 +17,15 @@ export default defineConfig({
17
17
  // https://github.com/vuetifyjs/vuetify-loader/tree/master/packages/vite-plugin#readme
18
18
  Vuetify(),
19
19
  Components(),
20
- ViteFonts({
21
- google: {
22
- families: [{
23
- name: 'Roboto',
24
- styles: 'wght@100;300;400;500;700;900',
25
- }],
20
+ Fonts({
21
+ fontsource: {
22
+ families: [
23
+ {
24
+ name: 'Roboto',
25
+ weights: [100, 300, 400, 500, 700, 900],
26
+ styles: ['normal', 'italic'],
27
+ },
28
+ ],
26
29
  },
27
30
  }),
28
31
  ],
@@ -32,7 +35,7 @@ export default defineConfig({
32
35
  define: { 'process.env': {} },
33
36
  resolve: {
34
37
  alias: {
35
- '@': fileURLToPath(new URL('./src', import.meta.url)),
38
+ '@': fileURLToPath(new URL('src', import.meta.url)),
36
39
  },
37
40
  extensions: [
38
41
  '.js',
@@ -17,12 +17,12 @@ const router = createRouter({
17
17
  // Workaround for https://github.com/vitejs/vite/issues/11804
18
18
  router.onError((err, to) => {
19
19
  if (err?.message?.includes?.('Failed to fetch dynamically imported module')) {
20
- if (!localStorage.getItem('vuetify:dynamic-reload')) {
20
+ if (localStorage.getItem('vuetify:dynamic-reload')) {
21
+ console.error('Dynamic import error, reloading page did not fix it', err)
22
+ } else {
21
23
  console.log('Reloading page to fix dynamic import error')
22
24
  localStorage.setItem('vuetify:dynamic-reload', 'true')
23
25
  location.assign(to.fullPath)
24
- } else {
25
- console.error('Dynamic import error, reloading page did not fix it', err)
26
26
  }
27
27
  } else {
28
28
  console.error(err)
@@ -24,7 +24,7 @@ export default defineConfig({
24
24
  'vue',
25
25
  VueRouterAutoImports,
26
26
  {
27
- 'pinia': ['defineStore', 'storeToRefs'],
27
+ pinia: ['defineStore', 'storeToRefs'],
28
28
  },
29
29
  ],
30
30
  dts: 'src/auto-imports.d.ts',
@@ -47,11 +47,14 @@ export default defineConfig({
47
47
  },
48
48
  }),
49
49
  Fonts({
50
- google: {
51
- families: [{
52
- name: 'Roboto',
53
- styles: 'wght@100;300;400;500;700;900',
54
- }],
50
+ fontsource: {
51
+ families: [
52
+ {
53
+ name: 'Roboto',
54
+ weights: [100, 300, 400, 500, 700, 900],
55
+ styles: ['normal', 'italic'],
56
+ },
57
+ ],
55
58
  },
56
59
  }),
57
60
  ],
@@ -67,7 +70,7 @@ export default defineConfig({
67
70
  define: { 'process.env': {} },
68
71
  resolve: {
69
72
  alias: {
70
- '@': fileURLToPath(new URL('./src', import.meta.url)),
73
+ '@': fileURLToPath(new URL('src', import.meta.url)),
71
74
  },
72
75
  extensions: [
73
76
  '.js',
@@ -7,8 +7,6 @@ import { pathToFileURL } from 'node:url'
7
7
  import fs from 'node:fs'
8
8
  import fsp from 'node:fs/promises'
9
9
 
10
- export type { ModuleOptions }
11
-
12
10
  // WARNING: Remove the file from modules directory if you install vuetify-nuxt-module
13
11
  export default defineNuxtModule<ModuleOptions>({
14
12
  meta: {
@@ -51,31 +49,26 @@ export default defineNuxtModule<ModuleOptions>({
51
49
  async configResolved (config) {
52
50
  if (isObject(options.styles)) {
53
51
  sassVariables = true
54
- if (path.isAbsolute(options.styles.configFile)) {
55
- configFile = path.resolve(options.styles.configFile)
56
- } else {
57
- configFile = path.resolve(path.join(config.root || process.cwd(), options.styles.configFile))
58
- }
52
+ configFile = path.isAbsolute(options.styles.configFile) ? path.resolve(options.styles.configFile) : path.resolve(path.join(config.root || process.cwd(), options.styles.configFile))
59
53
  configFile = pathToFileURL(configFile).href
60
- }
61
- else {
54
+ } else {
62
55
  isNone = options.styles === 'none'
63
56
  }
64
57
  },
65
58
  async resolveId (source, importer, { custom, ssr }) {
66
59
  if (source.startsWith(PREFIX) || source.startsWith(SSR_PREFIX)) {
67
- if (source.match(/\.s[ca]ss$/)) {
60
+ if (/\.s[ca]ss$/.test(source)) {
68
61
  return source
69
62
  }
70
63
 
71
64
  const idx = source.indexOf('?')
72
- return idx > -1 ? source.slice(0, idx) : source
65
+ return idx === -1 ? source : source.slice(0, idx)
73
66
  }
74
67
  if (
75
68
  source === 'vuetify/styles' || (
76
- importer &&
77
- source.endsWith('.css') &&
78
- isSubdir(vuetifyBase, path.isAbsolute(source) ? source : importer)
69
+ importer
70
+ && source.endsWith('.css')
71
+ && isSubdir(vuetifyBase, path.isAbsolute(source) ? source : importer)
79
72
  )
80
73
  ) {
81
74
  if (options.styles === 'sass') {
@@ -84,8 +77,9 @@ export default defineNuxtModule<ModuleOptions>({
84
77
 
85
78
  const resolution = await this.resolve(source, importer, { skipSelf: true, custom })
86
79
 
87
- if (!resolution)
80
+ if (!resolution) {
88
81
  return undefined
82
+ }
89
83
 
90
84
  const target = await resolveCss(resolution.id)
91
85
  if (isNone) {
@@ -93,21 +87,21 @@ export default defineNuxtModule<ModuleOptions>({
93
87
  return target
94
88
  }
95
89
 
96
- return `${ssr ? SSR_PREFIX: PREFIX}${path.relative(vuetifyBase, target)}`
90
+ return `${ssr ? SSR_PREFIX : PREFIX}${path.relative(vuetifyBase, target)}`
97
91
  }
98
92
 
99
93
  return undefined
100
94
  },
101
- load (id){
95
+ load (id) {
102
96
  if (sassVariables) {
103
97
  const target = id.startsWith(PREFIX)
104
98
  ? path.resolve(vuetifyBase, id.slice(PREFIX.length))
105
- : id.startsWith(SSR_PREFIX)
106
- ? path.resolve(vuetifyBase, id.slice(SSR_PREFIX.length))
107
- : undefined
99
+ : (id.startsWith(SSR_PREFIX)
100
+ ? path.resolve(vuetifyBase, id.slice(SSR_PREFIX.length))
101
+ : undefined)
108
102
 
109
103
  if (target) {
110
- const suffix = target.match(/\.scss/) ? ';\n' : '\n'
104
+ const suffix = /\.scss/.test(target) ? ';\n' : '\n'
111
105
  return {
112
106
  code: `@use "${configFile}"${suffix}@use "${pathToFileURL(target).href}"${suffix}`,
113
107
  map: {
@@ -132,10 +126,10 @@ function resolveCssFactory () {
132
126
  try {
133
127
  mapping = source.replace(/\.css$/, '.sass')
134
128
  await fsp.access(mapping, fs.constants.R_OK)
135
- }
136
- catch (err) {
137
- if (!(err instanceof Error && 'code' in err && err.code === 'ENOENT'))
138
- throw err
129
+ } catch (error) {
130
+ if (!(error instanceof Error && 'code' in error && error.code === 'ENOENT')) {
131
+ throw error
132
+ }
139
133
  mapping = source.replace(/\.css$/, '.scss')
140
134
  }
141
135
  mappings.set(source, mapping)
@@ -148,3 +142,5 @@ function isSubdir (root: string, test: string) {
148
142
  const relative = path.relative(root, test)
149
143
  return relative && !relative.startsWith('..') && !path.isAbsolute(relative)
150
144
  }
145
+
146
+ export { type Options as ModuleOptions } from '@vuetify/loader-shared'
@@ -10,5 +10,5 @@ export default defineNuxtPlugin(nuxtApp => {
10
10
  },
11
11
  })
12
12
 
13
- nuxtApp.vueApp.use(vuetify);
13
+ nuxtApp.vueApp.use(vuetify)
14
14
  })