create-vuetify 1.0.8 → 1.1.1

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.
Files changed (51) hide show
  1. package/dist/output.cjs +3 -2
  2. package/package.json +1 -1
  3. package/template/javascript/base/README.md +12 -0
  4. package/template/javascript/base/package.json +3 -3
  5. package/template/javascript/base/src/main.js +3 -3
  6. package/template/javascript/base/src/plugins/index.js +0 -2
  7. package/template/javascript/base/src/router/index.js +2 -2
  8. package/template/javascript/base/vite.config.js +11 -2
  9. package/template/javascript/custom/router/src/plugins/index.js +0 -2
  10. package/template/javascript/custom/router/src/router/index.js +2 -2
  11. package/template/javascript/custom/router-pinia/src/plugins/index.js +0 -2
  12. package/template/javascript/custom/store/src/plugins/index.js +0 -2
  13. package/template/javascript/default/README.md +9 -0
  14. package/template/javascript/default/package.json +3 -3
  15. package/template/javascript/default/src/main.js +3 -3
  16. package/template/javascript/default/src/plugins/index.js +0 -2
  17. package/template/javascript/default/vite.config.js +11 -2
  18. package/template/javascript/essentials/README.md +12 -0
  19. package/template/javascript/essentials/package.json +3 -3
  20. package/template/javascript/essentials/src/main.js +3 -3
  21. package/template/javascript/essentials/src/plugins/index.js +0 -2
  22. package/template/javascript/essentials/src/router/index.js +2 -2
  23. package/template/javascript/essentials/vite.config.js +11 -2
  24. package/template/typescript/base/README.md +12 -0
  25. package/template/typescript/base/package.json +3 -4
  26. package/template/typescript/base/src/main.ts +3 -3
  27. package/template/typescript/base/src/plugins/index.ts +0 -2
  28. package/template/typescript/base/src/router/index.ts +2 -2
  29. package/template/typescript/base/vite.config.ts +16 -13
  30. package/template/typescript/custom/router/src/plugins/index.ts +0 -2
  31. package/template/typescript/custom/router/src/router/index.ts +2 -2
  32. package/template/typescript/custom/router-pinia/src/plugins/index.ts +0 -2
  33. package/template/typescript/custom/store/src/plugins/index.ts +0 -2
  34. package/template/typescript/default/README.md +9 -0
  35. package/template/typescript/default/package.json +3 -4
  36. package/template/typescript/default/src/main.ts +3 -3
  37. package/template/typescript/default/src/plugins/index.ts +0 -2
  38. package/template/typescript/default/vite.config.ts +16 -13
  39. package/template/typescript/essentials/README.md +12 -0
  40. package/template/typescript/essentials/package.json +3 -4
  41. package/template/typescript/essentials/src/main.ts +3 -3
  42. package/template/typescript/essentials/src/plugins/index.ts +0 -2
  43. package/template/typescript/essentials/src/router/index.ts +2 -2
  44. package/template/typescript/essentials/tsconfig.json +1 -1
  45. package/template/typescript/essentials/vite.config.ts +16 -13
  46. package/template/javascript/base/src/plugins/webfontloader.js +0 -15
  47. package/template/javascript/default/src/plugins/webfontloader.js +0 -15
  48. package/template/javascript/essentials/src/plugins/webfontloader.js +0 -15
  49. package/template/typescript/base/src/plugins/webfontloader.ts +0 -15
  50. package/template/typescript/default/src/plugins/webfontloader.ts +0 -15
  51. package/template/typescript/essentials/src/plugins/webfontloader.ts +0 -15
package/dist/output.cjs CHANGED
@@ -118,12 +118,13 @@ var promptQuestions = (context) => [
118
118
  {
119
119
  name: "usePackageManager",
120
120
  type: "select",
121
- message: "Would you like to install dependencies with yarn, npm, or pnpm?",
121
+ message: "Would you like to install dependencies with yarn, npm, pnpm, or bun?",
122
122
  initial: 0,
123
123
  choices: [
124
124
  { title: "yarn", value: "yarn" },
125
125
  { title: "npm", value: "npm" },
126
126
  { title: "pnpm", value: "pnpm" },
127
+ { title: "bun", value: "bun" },
127
128
  { title: "none", value: null }
128
129
  ]
129
130
  }
@@ -154,7 +155,7 @@ var import_minimist = __toESM(require("minimist"), 1);
154
155
  // src/utils/installDependencies.ts
155
156
  var import_child_process = require("child_process");
156
157
  function installDependencies(projectRoot, packageManager) {
157
- const cmd = packageManager === "npm" ? "npm install" : packageManager === "yarn" ? "yarn" : "pnpm install";
158
+ const cmd = packageManager === "npm" ? "npm install" : packageManager === "yarn" ? "yarn" : packageManager === "bun" ? "bun install" : "pnpm install";
158
159
  const spawn = (0, import_child_process.spawnSync)(cmd, {
159
160
  cwd: projectRoot,
160
161
  stdio: ["inherit", "inherit", "pipe"],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-vuetify",
3
- "version": "1.0.8",
3
+ "version": "1.1.1",
4
4
  "main": "dist/output.cjs",
5
5
  "author": "Elijah Kotyluk <elijah@elijahkotyluk.com>",
6
6
  "license": "MIT",
@@ -11,6 +11,9 @@ npm install
11
11
 
12
12
  # pnpm
13
13
  pnpm install
14
+
15
+ # pnpm
16
+ bun install
14
17
  ```
15
18
 
16
19
  ### Compiles and hot-reloads for development
@@ -24,6 +27,9 @@ npm run dev
24
27
 
25
28
  # pnpm
26
29
  pnpm dev
30
+
31
+ # bun
32
+ bun run dev
27
33
  ```
28
34
 
29
35
  ### Compiles and minifies for production
@@ -37,6 +43,9 @@ npm run build
37
43
 
38
44
  # pnpm
39
45
  pnpm build
46
+
47
+ # bun
48
+ bun run build
40
49
  ```
41
50
 
42
51
  ### Lints and fixes files
@@ -50,6 +59,9 @@ npm run lint
50
59
 
51
60
  # pnpm
52
61
  pnpm lint
62
+
63
+ # bun
64
+ bun run lint
53
65
  ```
54
66
 
55
67
  ### Customize configuration
@@ -13,8 +13,7 @@
13
13
  "roboto-fontface": "*",
14
14
  "vue": "^3.2.0",
15
15
  "vue-router": "^4.0.0",
16
- "vuetify": "^3.0.0",
17
- "webfontloader": "^1.0.0"
16
+ "vuetify": "^3.0.0"
18
17
  },
19
18
  "devDependencies": {
20
19
  "@vitejs/plugin-vue": "^4.0.0",
@@ -22,6 +21,7 @@
22
21
  "eslint-plugin-vue": "^9.3.0",
23
22
  "sass": "^1.60.0",
24
23
  "vite": "^4.2.0",
25
- "vite-plugin-vuetify": "^1.0.0"
24
+ "vite-plugin-vuetify": "^1.0.0",
25
+ "unplugin-fonts": "^1.0.3"
26
26
  }
27
27
  }
@@ -4,15 +4,15 @@
4
4
  * Bootstraps Vuetify and other plugins then mounts the App`
5
5
  */
6
6
 
7
+ // Plugins
8
+ import { registerPlugins } from '@/plugins'
9
+
7
10
  // Components
8
11
  import App from './App.vue'
9
12
 
10
13
  // Composables
11
14
  import { createApp } from 'vue'
12
15
 
13
- // Plugins
14
- import { registerPlugins } from '@/plugins'
15
-
16
16
  const app = createApp(App)
17
17
 
18
18
  registerPlugins(app)
@@ -5,12 +5,10 @@
5
5
  */
6
6
 
7
7
  // Plugins
8
- import { loadFonts } from './webfontloader'
9
8
  import vuetify from './vuetify'
10
9
  import router from '../router'
11
10
 
12
11
  export function registerPlugins (app) {
13
- loadFonts()
14
12
  app
15
13
  .use(vuetify)
16
14
  .use(router)
@@ -10,9 +10,9 @@ const routes = [
10
10
  path: '',
11
11
  name: 'Home',
12
12
  // route level code-splitting
13
- // this generates a separate chunk (about.[hash].js) for this route
13
+ // this generates a separate chunk (Home-[hash].js) for this route
14
14
  // which is lazy-loaded when the route is visited.
15
- component: () => import(/* webpackChunkName: "home" */ '@/views/Home.vue'),
15
+ component: () => import('@/views/Home.vue'),
16
16
  },
17
17
  ],
18
18
  },
@@ -1,6 +1,7 @@
1
1
  // Plugins
2
2
  import vue from '@vitejs/plugin-vue'
3
3
  import vuetify, { transformAssetUrls } from 'vite-plugin-vuetify'
4
+ import ViteFonts from 'unplugin-fonts/vite'
4
5
 
5
6
  // Utilities
6
7
  import { defineConfig } from 'vite'
@@ -9,16 +10,24 @@ import { fileURLToPath, URL } from 'node:url'
9
10
  // https://vitejs.dev/config/
10
11
  export default defineConfig({
11
12
  plugins: [
12
- vue({
13
+ vue({
13
14
  template: { transformAssetUrls }
14
15
  }),
15
- // https://github.com/vuetifyjs/vuetify-loader/tree/next/packages/vite-plugin
16
+ // https://github.com/vuetifyjs/vuetify-loader/tree/master/packages/vite-plugin#readme
16
17
  vuetify({
17
18
  autoImport: true,
18
19
  styles: {
19
20
  configFile: 'src/styles/settings.scss',
20
21
  },
21
22
  }),
23
+ ViteFonts({
24
+ google: {
25
+ families: [{
26
+ name: 'Roboto',
27
+ styles: 'wght@100;300;400;500;700;900',
28
+ }],
29
+ },
30
+ }),
22
31
  ],
23
32
  define: { 'process.env': {} },
24
33
  resolve: {
@@ -5,12 +5,10 @@
5
5
  */
6
6
 
7
7
  // Plugins
8
- import { loadFonts } from './webfontloader'
9
8
  import vuetify from './vuetify'
10
9
  import router from '../router'
11
10
 
12
11
  export function registerPlugins (app) {
13
- loadFonts()
14
12
  app
15
13
  .use(vuetify)
16
14
  .use(router)
@@ -10,9 +10,9 @@ const routes = [
10
10
  path: '',
11
11
  name: 'Home',
12
12
  // route level code-splitting
13
- // this generates a separate chunk (about.[hash].js) for this route
13
+ // this generates a separate chunk (Home-[hash].js) for this route
14
14
  // which is lazy-loaded when the route is visited.
15
- component: () => import(/* webpackChunkName: "home" */ '@/views/Home.vue'),
15
+ component: () => import('@/views/Home.vue'),
16
16
  },
17
17
  ],
18
18
  },
@@ -5,13 +5,11 @@
5
5
  */
6
6
 
7
7
  // Plugins
8
- import { loadFonts } from './webfontloader'
9
8
  import vuetify from './vuetify'
10
9
  import pinia from '../store'
11
10
  import router from '../router'
12
11
 
13
12
  export function registerPlugins (app) {
14
- loadFonts()
15
13
  app
16
14
  .use(vuetify)
17
15
  .use(pinia)
@@ -5,12 +5,10 @@
5
5
  */
6
6
 
7
7
  // Plugins
8
- import { loadFonts } from './webfontloader'
9
8
  import vuetify from './vuetify'
10
9
  import pinia from '../store'
11
10
 
12
11
  export function registerPlugins (app) {
13
- loadFonts()
14
12
  app
15
13
  .use(vuetify)
16
14
  .use(pinia)
@@ -11,6 +11,9 @@ npm install
11
11
 
12
12
  # pnpm
13
13
  pnpm install
14
+
15
+ # bun
16
+ bun install
14
17
  ```
15
18
 
16
19
  ### Compiles and hot-reloads for development
@@ -24,6 +27,9 @@ npm run dev
24
27
 
25
28
  # pnpm
26
29
  pnpm dev
30
+
31
+ # bun
32
+ bun run dev
27
33
  ```
28
34
 
29
35
  ### Compiles and minifies for production
@@ -37,6 +43,9 @@ npm run build
37
43
 
38
44
  # pnpm
39
45
  pnpm build
46
+
47
+ # bun
48
+ bun run build
40
49
  ```
41
50
 
42
51
  ### Customize configuration
@@ -9,12 +9,12 @@
9
9
  "@mdi/font": "7.0.96",
10
10
  "roboto-fontface": "*",
11
11
  "vue": "^3.2.0",
12
- "vuetify": "^3.0.0",
13
- "webfontloader": "^1.0.0"
12
+ "vuetify": "^3.0.0"
14
13
  },
15
14
  "devDependencies": {
16
15
  "@vitejs/plugin-vue": "^4.0.0",
17
16
  "vite-plugin-vuetify": "^1.0.0",
18
- "vite": "^4.2.0"
17
+ "vite": "^4.2.0",
18
+ "unplugin-fonts": "^1.0.3"
19
19
  }
20
20
  }
@@ -4,15 +4,15 @@
4
4
  * Bootstraps Vuetify and other plugins then mounts the App`
5
5
  */
6
6
 
7
+ // Plugins
8
+ import { registerPlugins } from '@/plugins'
9
+
7
10
  // Components
8
11
  import App from './App.vue'
9
12
 
10
13
  // Composables
11
14
  import { createApp } from 'vue'
12
15
 
13
- // Plugins
14
- import { registerPlugins } from '@/plugins'
15
-
16
16
  const app = createApp(App)
17
17
 
18
18
  registerPlugins(app)
@@ -5,10 +5,8 @@
5
5
  */
6
6
 
7
7
  // Plugins
8
- import { loadFonts } from './webfontloader'
9
8
  import vuetify from './vuetify'
10
9
 
11
10
  export function registerPlugins (app) {
12
- loadFonts()
13
11
  app.use(vuetify)
14
12
  }
@@ -1,6 +1,7 @@
1
1
  // Plugins
2
2
  import vue from '@vitejs/plugin-vue'
3
3
  import vuetify, { transformAssetUrls } from 'vite-plugin-vuetify'
4
+ import ViteFonts from 'unplugin-fonts/vite'
4
5
 
5
6
  // Utilities
6
7
  import { defineConfig } from 'vite'
@@ -9,13 +10,21 @@ import { fileURLToPath, URL } from 'node:url'
9
10
  // https://vitejs.dev/config/
10
11
  export default defineConfig({
11
12
  plugins: [
12
- vue({
13
+ vue({
13
14
  template: { transformAssetUrls }
14
15
  }),
15
- // https://github.com/vuetifyjs/vuetify-loader/tree/next/packages/vite-plugin
16
+ // https://github.com/vuetifyjs/vuetify-loader/tree/master/packages/vite-plugin#readme
16
17
  vuetify({
17
18
  autoImport: true,
18
19
  }),
20
+ ViteFonts({
21
+ google: {
22
+ families: [{
23
+ name: 'Roboto',
24
+ styles: 'wght@100;300;400;500;700;900',
25
+ }],
26
+ },
27
+ }),
19
28
  ],
20
29
  define: { 'process.env': {} },
21
30
  resolve: {
@@ -11,6 +11,9 @@ npm install
11
11
 
12
12
  # pnpm
13
13
  pnpm install
14
+
15
+ # bun
16
+ bun install
14
17
  ```
15
18
 
16
19
  ### Compiles and hot-reloads for development
@@ -24,6 +27,9 @@ npm run dev
24
27
 
25
28
  # pnpm
26
29
  pnpm dev
30
+
31
+ # bun
32
+ bun run dev
27
33
  ```
28
34
 
29
35
  ### Compiles and minifies for production
@@ -37,6 +43,9 @@ npm run build
37
43
 
38
44
  # pnpm
39
45
  pnpm build
46
+
47
+ # bun
48
+ bun run build
40
49
  ```
41
50
 
42
51
  ### Lints and fixes files
@@ -50,6 +59,9 @@ npm run lint
50
59
 
51
60
  # pnpm
52
61
  pnpm lint
62
+
63
+ # bun
64
+ bun run lint
53
65
  ```
54
66
 
55
67
  ### Customize configuration
@@ -14,8 +14,7 @@
14
14
  "roboto-fontface": "*",
15
15
  "vue": "^3.2.0",
16
16
  "vue-router": "^4.0.0",
17
- "vuetify": "^3.0.0",
18
- "webfontloader": "^1.0.0"
17
+ "vuetify": "^3.0.0"
19
18
  },
20
19
  "devDependencies": {
21
20
  "@vitejs/plugin-vue": "^4.0.0",
@@ -23,6 +22,7 @@
23
22
  "eslint-plugin-vue": "^9.3.0",
24
23
  "sass": "^1.60.0",
25
24
  "vite": "^4.2.0",
26
- "vite-plugin-vuetify": "^1.0.0"
25
+ "vite-plugin-vuetify": "^1.0.0",
26
+ "unplugin-fonts": "^1.0.3"
27
27
  }
28
28
  }
@@ -4,15 +4,15 @@
4
4
  * Bootstraps Vuetify and other plugins then mounts the App`
5
5
  */
6
6
 
7
+ // Plugins
8
+ import { registerPlugins } from '@/plugins'
9
+
7
10
  // Components
8
11
  import App from './App.vue'
9
12
 
10
13
  // Composables
11
14
  import { createApp } from 'vue'
12
15
 
13
- // Plugins
14
- import { registerPlugins } from '@/plugins'
15
-
16
16
  const app = createApp(App)
17
17
 
18
18
  registerPlugins(app)
@@ -5,13 +5,11 @@
5
5
  */
6
6
 
7
7
  // Plugins
8
- import { loadFonts } from './webfontloader'
9
8
  import vuetify from './vuetify'
10
9
  import pinia from '../store'
11
10
  import router from '../router'
12
11
 
13
12
  export function registerPlugins (app) {
14
- loadFonts()
15
13
  app
16
14
  .use(vuetify)
17
15
  .use(router)
@@ -10,9 +10,9 @@ const routes = [
10
10
  path: '',
11
11
  name: 'Home',
12
12
  // route level code-splitting
13
- // this generates a separate chunk (about.[hash].js) for this route
13
+ // this generates a separate chunk (Home-[hash].js) for this route
14
14
  // which is lazy-loaded when the route is visited.
15
- component: () => import(/* webpackChunkName: "home" */ '@/views/Home.vue'),
15
+ component: () => import('@/views/Home.vue'),
16
16
  },
17
17
  ],
18
18
  },
@@ -1,6 +1,7 @@
1
1
  // Plugins
2
2
  import vue from '@vitejs/plugin-vue'
3
3
  import vuetify, { transformAssetUrls } from 'vite-plugin-vuetify'
4
+ import ViteFonts from 'unplugin-fonts/vite'
4
5
 
5
6
  // Utilities
6
7
  import { defineConfig } from 'vite'
@@ -9,16 +10,24 @@ import { fileURLToPath, URL } from 'node:url'
9
10
  // https://vitejs.dev/config/
10
11
  export default defineConfig({
11
12
  plugins: [
12
- vue({
13
+ vue({
13
14
  template: { transformAssetUrls }
14
15
  }),
15
- // https://github.com/vuetifyjs/vuetify-loader/tree/next/packages/vite-plugin
16
+ // https://github.com/vuetifyjs/vuetify-loader/tree/master/packages/vite-plugin#readme
16
17
  vuetify({
17
18
  autoImport: true,
18
19
  styles: {
19
20
  configFile: 'src/styles/settings.scss',
20
21
  },
21
22
  }),
23
+ ViteFonts({
24
+ google: {
25
+ families: [{
26
+ name: 'Roboto',
27
+ styles: 'wght@100;300;400;500;700;900',
28
+ }],
29
+ },
30
+ }),
22
31
  ],
23
32
  define: { 'process.env': {} },
24
33
  resolve: {
@@ -11,6 +11,9 @@ npm install
11
11
 
12
12
  # pnpm
13
13
  pnpm install
14
+
15
+ # bun
16
+ bun install
14
17
  ```
15
18
 
16
19
  ### Compiles and hot-reloads for development
@@ -24,6 +27,9 @@ npm run dev
24
27
 
25
28
  # pnpm
26
29
  pnpm dev
30
+
31
+ # bun
32
+ pnpm run dev
27
33
  ```
28
34
 
29
35
  ### Compiles and minifies for production
@@ -37,6 +43,9 @@ npm run build
37
43
 
38
44
  # pnpm
39
45
  pnpm build
46
+
47
+ # bun
48
+ pnpm run build
40
49
  ```
41
50
 
42
51
  ### Lints and fixes files
@@ -50,6 +59,9 @@ npm run lint
50
59
 
51
60
  # pnpm
52
61
  pnpm lint
62
+
63
+ # bun
64
+ pnpm run lint
53
65
  ```
54
66
 
55
67
  ### Customize configuration
@@ -13,13 +13,11 @@
13
13
  "roboto-fontface": "*",
14
14
  "vue": "^3.2.0",
15
15
  "vue-router": "^4.0.0",
16
- "vuetify": "^3.0.0",
17
- "webfontloader": "^1.0.0"
16
+ "vuetify": "^3.0.0"
18
17
  },
19
18
  "devDependencies": {
20
19
  "@babel/types": "^7.21.4",
21
20
  "@types/node": "^18.15.0",
22
- "@types/webfontloader": "^1.6.35",
23
21
  "@vitejs/plugin-vue": "^4.0.0",
24
22
  "@vue/eslint-config-typescript": "^11.0.0",
25
23
  "eslint": "^8.22.0",
@@ -28,6 +26,7 @@
28
26
  "typescript": "^5.0.0",
29
27
  "vite": "^4.2.0",
30
28
  "vite-plugin-vuetify": "^1.0.0",
31
- "vue-tsc": "^1.2.0"
29
+ "vue-tsc": "^1.2.0",
30
+ "unplugin-fonts": "^1.0.3"
32
31
  }
33
32
  }
@@ -4,15 +4,15 @@
4
4
  * Bootstraps Vuetify and other plugins then mounts the App`
5
5
  */
6
6
 
7
+ // Plugins
8
+ import { registerPlugins } from '@/plugins'
9
+
7
10
  // Components
8
11
  import App from './App.vue'
9
12
 
10
13
  // Composables
11
14
  import { createApp } from 'vue'
12
15
 
13
- // Plugins
14
- import { registerPlugins } from '@/plugins'
15
-
16
16
  const app = createApp(App)
17
17
 
18
18
  registerPlugins(app)
@@ -5,7 +5,6 @@
5
5
  */
6
6
 
7
7
  // Plugins
8
- import { loadFonts } from './webfontloader'
9
8
  import vuetify from './vuetify'
10
9
  import router from '../router'
11
10
 
@@ -13,7 +12,6 @@ import router from '../router'
13
12
  import type { App } from 'vue'
14
13
 
15
14
  export function registerPlugins (app: App) {
16
- loadFonts()
17
15
  app
18
16
  .use(vuetify)
19
17
  .use(router)
@@ -10,9 +10,9 @@ const routes = [
10
10
  path: '',
11
11
  name: 'Home',
12
12
  // route level code-splitting
13
- // this generates a separate chunk (about.[hash].js) for this route
13
+ // this generates a separate chunk (Home-[hash].js) for this route
14
14
  // which is lazy-loaded when the route is visited.
15
- component: () => import(/* webpackChunkName: "home" */ '@/views/Home.vue'),
15
+ component: () => import('@/views/Home.vue'),
16
16
  },
17
17
  ],
18
18
  },
@@ -1,6 +1,7 @@
1
1
  // Plugins
2
2
  import vue from '@vitejs/plugin-vue'
3
3
  import vuetify, { transformAssetUrls } from 'vite-plugin-vuetify'
4
+ import ViteFonts from 'unplugin-fonts/vite'
4
5
 
5
6
  // Utilities
6
7
  import { defineConfig } from 'vite'
@@ -9,31 +10,33 @@ import { fileURLToPath, URL } from 'node:url'
9
10
  // https://vitejs.dev/config/
10
11
  export default defineConfig({
11
12
  plugins: [
12
- vue({
13
- template: { transformAssetUrls }
13
+ vue({
14
+ template: { transformAssetUrls },
14
15
  }),
15
- // https://github.com/vuetifyjs/vuetify-loader/tree/next/packages/vite-plugin
16
+ // https://github.com/vuetifyjs/vuetify-loader/tree/master/packages/vite-plugin#readme
16
17
  vuetify({
17
18
  autoImport: true,
18
19
  styles: {
19
20
  configFile: 'src/styles/settings.scss',
20
21
  },
21
22
  }),
23
+ ViteFonts({
24
+ google: {
25
+ families: [
26
+ {
27
+ name: 'Roboto',
28
+ styles: 'wght@100;300;400;500;700;900',
29
+ },
30
+ ],
31
+ },
32
+ }),
22
33
  ],
23
34
  define: { 'process.env': {} },
24
35
  resolve: {
25
36
  alias: {
26
- '@': fileURLToPath(new URL('./src', import.meta.url))
37
+ '@': fileURLToPath(new URL('./src', import.meta.url)),
27
38
  },
28
- extensions: [
29
- '.js',
30
- '.json',
31
- '.jsx',
32
- '.mjs',
33
- '.ts',
34
- '.tsx',
35
- '.vue',
36
- ],
39
+ extensions: ['.js', '.json', '.jsx', '.mjs', '.ts', '.tsx', '.vue'],
37
40
  },
38
41
  server: {
39
42
  port: 3000,
@@ -5,7 +5,6 @@
5
5
  */
6
6
 
7
7
  // Plugins
8
- import { loadFonts } from './webfontloader'
9
8
  import vuetify from './vuetify'
10
9
  import router from '../router'
11
10
 
@@ -13,7 +12,6 @@ import router from '../router'
13
12
  import type { App } from 'vue'
14
13
 
15
14
  export function registerPlugins (app: App) {
16
- loadFonts()
17
15
  app
18
16
  .use(vuetify)
19
17
  .use(router)
@@ -10,9 +10,9 @@ const routes = [
10
10
  path: '',
11
11
  name: 'Home',
12
12
  // route level code-splitting
13
- // this generates a separate chunk (about.[hash].js) for this route
13
+ // this generates a separate chunk (Home-[hash].js) for this route
14
14
  // which is lazy-loaded when the route is visited.
15
- component: () => import(/* webpackChunkName: "home" */ '@/views/Home.vue'),
15
+ component: () => import('@/views/Home.vue'),
16
16
  },
17
17
  ],
18
18
  },
@@ -5,7 +5,6 @@
5
5
  */
6
6
 
7
7
  // Plugins
8
- import { loadFonts } from './webfontloader'
9
8
  import vuetify from './vuetify'
10
9
  import pinia from '../store'
11
10
  import router from '../router'
@@ -14,7 +13,6 @@ import router from '../router'
14
13
  import type { App } from 'vue'
15
14
 
16
15
  export function registerPlugins (app: App) {
17
- loadFonts()
18
16
  app
19
17
  .use(vuetify)
20
18
  .use(router)
@@ -5,7 +5,6 @@
5
5
  */
6
6
 
7
7
  // Plugins
8
- import { loadFonts } from './webfontloader'
9
8
  import vuetify from './vuetify'
10
9
  import pinia from '../store'
11
10
 
@@ -13,7 +12,6 @@ import pinia from '../store'
13
12
  import type { App } from 'vue'
14
13
 
15
14
  export function registerPlugins (app: App) {
16
- loadFonts()
17
15
  app
18
16
  .use(vuetify)
19
17
  .use(pinia)
@@ -11,6 +11,9 @@ npm install
11
11
 
12
12
  # pnpm
13
13
  pnpm install
14
+
15
+ # bun
16
+ bun install
14
17
  ```
15
18
 
16
19
  ### Compiles and hot-reloads for development
@@ -24,6 +27,9 @@ npm run dev
24
27
 
25
28
  # pnpm
26
29
  pnpm dev
30
+
31
+ # bun
32
+ bun run dev
27
33
  ```
28
34
 
29
35
  ### Compiles and minifies for production
@@ -37,6 +43,9 @@ npm run build
37
43
 
38
44
  # pnpm
39
45
  pnpm build
46
+
47
+ # bun
48
+ bun run build
40
49
  ```
41
50
 
42
51
  ### Customize configuration
@@ -9,17 +9,16 @@
9
9
  "@mdi/font": "7.0.96",
10
10
  "roboto-fontface": "*",
11
11
  "vue": "^3.2.0",
12
- "vuetify": "^3.0.0",
13
- "webfontloader": "^1.0.0"
12
+ "vuetify": "^3.0.0"
14
13
  },
15
14
  "devDependencies": {
16
15
  "@babel/types": "^7.21.4",
17
16
  "@types/node": "^18.15.0",
18
- "@types/webfontloader": "^1.6.35",
19
17
  "@vitejs/plugin-vue": "^4.0.0",
20
18
  "typescript": "^5.0.0",
21
19
  "vite": "^4.2.0",
22
20
  "vite-plugin-vuetify": "^1.0.0",
23
- "vue-tsc": "^1.2.0"
21
+ "vue-tsc": "^1.2.0",
22
+ "unplugin-fonts": "^1.0.3"
24
23
  }
25
24
  }
@@ -4,15 +4,15 @@
4
4
  * Bootstraps Vuetify and other plugins then mounts the App`
5
5
  */
6
6
 
7
+ // Plugins
8
+ import { registerPlugins } from '@/plugins'
9
+
7
10
  // Components
8
11
  import App from './App.vue'
9
12
 
10
13
  // Composables
11
14
  import { createApp } from 'vue'
12
15
 
13
- // Plugins
14
- import { registerPlugins } from '@/plugins'
15
-
16
16
  const app = createApp(App)
17
17
 
18
18
  registerPlugins(app)
@@ -5,13 +5,11 @@
5
5
  */
6
6
 
7
7
  // Plugins
8
- import { loadFonts } from './webfontloader'
9
8
  import vuetify from './vuetify'
10
9
 
11
10
  // Types
12
11
  import type { App } from 'vue'
13
12
 
14
13
  export function registerPlugins (app: App) {
15
- loadFonts()
16
14
  app.use(vuetify)
17
15
  }
@@ -1,6 +1,7 @@
1
1
  // Plugins
2
2
  import vue from '@vitejs/plugin-vue'
3
3
  import vuetify, { transformAssetUrls } from 'vite-plugin-vuetify'
4
+ import ViteFonts from 'unplugin-fonts/vite'
4
5
 
5
6
  // Utilities
6
7
  import { defineConfig } from 'vite'
@@ -9,28 +10,30 @@ import { fileURLToPath, URL } from 'node:url'
9
10
  // https://vitejs.dev/config/
10
11
  export default defineConfig({
11
12
  plugins: [
12
- vue({
13
- template: { transformAssetUrls }
13
+ vue({
14
+ template: { transformAssetUrls },
14
15
  }),
15
- // https://github.com/vuetifyjs/vuetify-loader/tree/next/packages/vite-plugin
16
+ // https://github.com/vuetifyjs/vuetify-loader/tree/master/packages/vite-plugin#readme
16
17
  vuetify({
17
18
  autoImport: true,
18
19
  }),
20
+ ViteFonts({
21
+ google: {
22
+ families: [
23
+ {
24
+ name: 'Roboto',
25
+ styles: 'wght@100;300;400;500;700;900',
26
+ },
27
+ ],
28
+ },
29
+ }),
19
30
  ],
20
31
  define: { 'process.env': {} },
21
32
  resolve: {
22
33
  alias: {
23
- '@': fileURLToPath(new URL('./src', import.meta.url))
34
+ '@': fileURLToPath(new URL('./src', import.meta.url)),
24
35
  },
25
- extensions: [
26
- '.js',
27
- '.json',
28
- '.jsx',
29
- '.mjs',
30
- '.ts',
31
- '.tsx',
32
- '.vue',
33
- ],
36
+ extensions: ['.js', '.json', '.jsx', '.mjs', '.ts', '.tsx', '.vue'],
34
37
  },
35
38
  server: {
36
39
  port: 3000,
@@ -11,6 +11,9 @@ npm install
11
11
 
12
12
  # pnpm
13
13
  pnpm install
14
+
15
+ # bun
16
+ bun install
14
17
  ```
15
18
 
16
19
  ### Compiles and hot-reloads for development
@@ -24,6 +27,9 @@ npm run dev
24
27
 
25
28
  # pnpm
26
29
  pnpm dev
30
+
31
+ # bun
32
+ bun run dev
27
33
  ```
28
34
 
29
35
  ### Compiles and minifies for production
@@ -37,6 +43,9 @@ npm run build
37
43
 
38
44
  # pnpm
39
45
  pnpm build
46
+
47
+ # bun
48
+ bun run build
40
49
  ```
41
50
 
42
51
  ### Lints and fixes files
@@ -50,6 +59,9 @@ npm run lint
50
59
 
51
60
  # pnpm
52
61
  pnpm lint
62
+
63
+ # bun
64
+ bun run lint
53
65
  ```
54
66
 
55
67
  ### Customize configuration
@@ -14,13 +14,11 @@
14
14
  "roboto-fontface": "*",
15
15
  "vue": "^3.2.0",
16
16
  "vue-router": "^4.0.0",
17
- "vuetify": "^3.0.0",
18
- "webfontloader": "^1.0.0"
17
+ "vuetify": "^3.0.0"
19
18
  },
20
19
  "devDependencies": {
21
20
  "@babel/types": "^7.21.4",
22
21
  "@types/node": "^18.15.0",
23
- "@types/webfontloader": "^1.6.35",
24
22
  "@vitejs/plugin-vue": "^4.0.0",
25
23
  "@vue/eslint-config-typescript": "^11.0.0",
26
24
  "eslint": "^8.37.0",
@@ -29,6 +27,7 @@
29
27
  "typescript": "^5.0.0",
30
28
  "vite": "^4.2.0",
31
29
  "vite-plugin-vuetify": "^1.0.0",
32
- "vue-tsc": "^1.2.0"
30
+ "vue-tsc": "^1.2.0",
31
+ "unplugin-fonts": "^1.0.3"
33
32
  }
34
33
  }
@@ -4,15 +4,15 @@
4
4
  * Bootstraps Vuetify and other plugins then mounts the App`
5
5
  */
6
6
 
7
+ // Plugins
8
+ import { registerPlugins } from '@/plugins'
9
+
7
10
  // Components
8
11
  import App from './App.vue'
9
12
 
10
13
  // Composables
11
14
  import { createApp } from 'vue'
12
15
 
13
- // Plugins
14
- import { registerPlugins } from '@/plugins'
15
-
16
16
  const app = createApp(App)
17
17
 
18
18
  registerPlugins(app)
@@ -5,7 +5,6 @@
5
5
  */
6
6
 
7
7
  // Plugins
8
- import { loadFonts } from './webfontloader'
9
8
  import vuetify from './vuetify'
10
9
  import pinia from '../store'
11
10
  import router from '../router'
@@ -14,7 +13,6 @@ import router from '../router'
14
13
  import type { App } from 'vue'
15
14
 
16
15
  export function registerPlugins (app: App) {
17
- loadFonts()
18
16
  app
19
17
  .use(vuetify)
20
18
  .use(router)
@@ -10,9 +10,9 @@ const routes = [
10
10
  path: '',
11
11
  name: 'Home',
12
12
  // route level code-splitting
13
- // this generates a separate chunk (about.[hash].js) for this route
13
+ // this generates a separate chunk (Home-[hash].js) for this route
14
14
  // which is lazy-loaded when the route is visited.
15
- component: () => import(/* webpackChunkName: "home" */ '@/views/Home.vue'),
15
+ component: () => import('@/views/Home.vue'),
16
16
  },
17
17
  ],
18
18
  },
@@ -19,7 +19,7 @@
19
19
  ],
20
20
  "paths": {
21
21
  "@/*": ["src/*"]
22
- },
22
+ }
23
23
  },
24
24
  "include": [
25
25
  "src/**/*.ts",
@@ -1,6 +1,7 @@
1
1
  // Plugins
2
2
  import vue from '@vitejs/plugin-vue'
3
3
  import vuetify, { transformAssetUrls } from 'vite-plugin-vuetify'
4
+ import ViteFonts from 'unplugin-fonts/vite'
4
5
 
5
6
  // Utilities
6
7
  import { defineConfig } from 'vite'
@@ -9,31 +10,33 @@ import { fileURLToPath, URL } from 'node:url'
9
10
  // https://vitejs.dev/config/
10
11
  export default defineConfig({
11
12
  plugins: [
12
- vue({
13
- template: { transformAssetUrls }
13
+ vue({
14
+ template: { transformAssetUrls },
14
15
  }),
15
- // https://github.com/vuetifyjs/vuetify-loader/tree/next/packages/vite-plugin
16
+ // https://github.com/vuetifyjs/vuetify-loader/tree/master/packages/vite-plugin#readme
16
17
  vuetify({
17
18
  autoImport: true,
18
19
  styles: {
19
20
  configFile: 'src/styles/settings.scss',
20
21
  },
21
22
  }),
23
+ ViteFonts({
24
+ google: {
25
+ families: [
26
+ {
27
+ name: 'Roboto',
28
+ styles: 'wght@100;300;400;500;700;900',
29
+ },
30
+ ],
31
+ },
32
+ }),
22
33
  ],
23
34
  define: { 'process.env': {} },
24
35
  resolve: {
25
36
  alias: {
26
- '@': fileURLToPath(new URL('./src', import.meta.url))
37
+ '@': fileURLToPath(new URL('./src', import.meta.url)),
27
38
  },
28
- extensions: [
29
- '.js',
30
- '.json',
31
- '.jsx',
32
- '.mjs',
33
- '.ts',
34
- '.tsx',
35
- '.vue',
36
- ],
39
+ extensions: ['.js', '.json', '.jsx', '.mjs', '.ts', '.tsx', '.vue'],
37
40
  },
38
41
  server: {
39
42
  port: 3000,
@@ -1,15 +0,0 @@
1
- /**
2
- * plugins/webfontloader.js
3
- *
4
- * webfontloader documentation: https://github.com/typekit/webfontloader
5
- */
6
-
7
- export async function loadFonts () {
8
- const webFontLoader = await import(/* webpackChunkName: "webfontloader" */'webfontloader')
9
-
10
- webFontLoader.load({
11
- google: {
12
- families: ['Roboto:100,300,400,500,700,900&display=swap'],
13
- },
14
- })
15
- }
@@ -1,15 +0,0 @@
1
- /**
2
- * plugins/webfontloader.js
3
- *
4
- * webfontloader documentation: https://github.com/typekit/webfontloader
5
- */
6
-
7
- export async function loadFonts () {
8
- const webFontLoader = await import(/* webpackChunkName: "webfontloader" */'webfontloader')
9
-
10
- webFontLoader.load({
11
- google: {
12
- families: ['Roboto:100,300,400,500,700,900&display=swap'],
13
- },
14
- })
15
- }
@@ -1,15 +0,0 @@
1
- /**
2
- * plugins/webfontloader.js
3
- *
4
- * webfontloader documentation: https://github.com/typekit/webfontloader
5
- */
6
-
7
- export async function loadFonts () {
8
- const webFontLoader = await import(/* webpackChunkName: "webfontloader" */'webfontloader')
9
-
10
- webFontLoader.load({
11
- google: {
12
- families: ['Roboto:100,300,400,500,700,900&display=swap'],
13
- },
14
- })
15
- }
@@ -1,15 +0,0 @@
1
- /**
2
- * plugins/webfontloader.ts
3
- *
4
- * webfontloader documentation: https://github.com/typekit/webfontloader
5
- */
6
-
7
- export async function loadFonts () {
8
- const webFontLoader = await import(/* webpackChunkName: "webfontloader" */'webfontloader')
9
-
10
- webFontLoader.load({
11
- google: {
12
- families: ['Roboto:100,300,400,500,700,900&display=swap'],
13
- },
14
- })
15
- }
@@ -1,15 +0,0 @@
1
- /**
2
- * plugins/webfontloader.ts
3
- *
4
- * webfontloader documentation: https://github.com/typekit/webfontloader
5
- */
6
-
7
- export async function loadFonts () {
8
- const webFontLoader = await import(/* webpackChunkName: "webfontloader" */'webfontloader')
9
-
10
- webFontLoader.load({
11
- google: {
12
- families: ['Roboto:100,300,400,500,700,900&display=swap'],
13
- },
14
- })
15
- }
@@ -1,15 +0,0 @@
1
- /**
2
- * plugins/webfontloader.ts
3
- *
4
- * webfontloader documentation: https://github.com/typekit/webfontloader
5
- */
6
-
7
- export async function loadFonts () {
8
- const webFontLoader = await import(/* webpackChunkName: "webfontloader" */'webfontloader')
9
-
10
- webFontLoader.load({
11
- google: {
12
- families: ['Roboto:100,300,400,500,700,900&display=swap'],
13
- },
14
- })
15
- }