create-vuetify 2.7.2 → 2.8.0-beta.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.
package/dist/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  // src/index.ts
2
2
  import { dirname as dirname3, join as join4, resolve as resolve6 } from "node:path";
3
3
  import { fileURLToPath } from "node:url";
4
- import { mkdirSync as mkdirSync2, rmSync, writeFileSync as writeFileSync2, existsSync as existsSync5 } from "node:fs";
4
+ import { mkdirSync as mkdirSync2, rmSync, writeFileSync as writeFileSync2, existsSync as existsSync5, readFileSync as readFileSync2 } from "node:fs";
5
5
 
6
6
  // src/utils/prompts.ts
7
7
  import { join as join2, resolve as resolve3 } from "node:path";
@@ -1053,6 +1053,16 @@ async function initPrompts(context) {
1053
1053
  { title: "Nuxt Recommended (Everything from Default. Enables auto importing & layouts)", value: "nuxt-essentials" }
1054
1054
  ]
1055
1055
  },
1056
+ {
1057
+ name: "vuetifyVersion",
1058
+ type: context.vuetifyVersion ? null : "select",
1059
+ message: "Which Vuetify version would you like to use?",
1060
+ initial: 0,
1061
+ choices: [
1062
+ { title: "Vuetify 3 (Stable)", value: "3.x" },
1063
+ { title: "Vuetify 4 (Alpha)", value: "4.x" }
1064
+ ]
1065
+ },
1056
1066
  {
1057
1067
  name: "useTypeScript",
1058
1068
  type: (usePreset) => {
@@ -1175,6 +1185,7 @@ function resolveNonInteractiveContext(context) {
1175
1185
  const useNuxtModule = context.useNuxtModule;
1176
1186
  const useNuxtSSR = context.useNuxtSSR;
1177
1187
  const useNuxtSSRClientHints = context.useNuxtSSRClientHints;
1188
+ const vuetifyVersion = context.vuetifyVersion;
1178
1189
  return {
1179
1190
  cwd: context.cwd,
1180
1191
  projectName,
@@ -1185,14 +1196,15 @@ function resolveNonInteractiveContext(context) {
1185
1196
  usePreset,
1186
1197
  useNuxtModule: useNuxtModule || false,
1187
1198
  useNuxtSSR: useNuxtSSR || false,
1188
- useNuxtSSRClientHints: useNuxtSSRClientHints || false
1199
+ useNuxtSSRClientHints: useNuxtSSRClientHints || false,
1200
+ vuetifyVersion: vuetifyVersion || "3.x"
1189
1201
  };
1190
1202
  }
1191
1203
 
1192
1204
  // package.json
1193
1205
  var package_default = {
1194
1206
  name: "create-vuetify",
1195
- version: "2.7.2",
1207
+ version: "2.8.0-beta.1",
1196
1208
  author: "Elijah Kotyluk <elijah@elijahkotyluk.com>",
1197
1209
  license: "MIT",
1198
1210
  type: "module",
@@ -1261,7 +1273,7 @@ var package_default = {
1261
1273
  nypm: "^0.6.2",
1262
1274
  typescript: "^5.9.2"
1263
1275
  },
1264
- packageManager: "pnpm@9.15.9"
1276
+ packageManager: "pnpm@10.26.1"
1265
1277
  };
1266
1278
 
1267
1279
  // src/utils/cli/helpText.ts
@@ -1278,6 +1290,7 @@ Options:
1278
1290
  --nuxt-module Use vuetify-nuxt-module (for Nuxt presets)
1279
1291
  --nuxt-ssr, --ssr Enable Nuxt SSR (for Nuxt presets)
1280
1292
  --nuxt-ssr-client-hints Enable Nuxt SSR Client Hints (for Nuxt presets)
1293
+ --v4 Use Vuetify 4 (Alpha)
1281
1294
  -h, --help Show help
1282
1295
  -v, --version Show version
1283
1296
 
@@ -1315,6 +1328,7 @@ function parseCliArgs(args) {
1315
1328
  nuxtModule: ["nuxt-module"],
1316
1329
  nuxtSSR: ["nuxt-ssr", "ssr"],
1317
1330
  nuxtSSRClientHints: ["nuxt-ssr-client-hints", "client-hints"],
1331
+ v4: [],
1318
1332
  help: ["h"],
1319
1333
  version: ["v"]
1320
1334
  },
@@ -1325,6 +1339,7 @@ function parseCliArgs(args) {
1325
1339
  "nuxtModule",
1326
1340
  "nuxtSSR",
1327
1341
  "nuxtSSRClientHints",
1342
+ "v4",
1328
1343
  "help",
1329
1344
  "version"
1330
1345
  ],
@@ -1350,6 +1365,7 @@ function parseCliArgs(args) {
1350
1365
  nuxtModule: argv.nuxtModule,
1351
1366
  nuxtSSR: argv.nuxtSSR,
1352
1367
  nuxtSSRClientHints: argv.nuxtSSRClientHints,
1368
+ v4: argv.v4,
1353
1369
  help: argv.help,
1354
1370
  version: argv.version
1355
1371
  };
@@ -1365,7 +1381,8 @@ function cliOptionsToContext(cliOptions, cwd2) {
1365
1381
  canOverwrite: cliOptions.overwrite ?? false,
1366
1382
  useNuxtModule: cliOptions.nuxtModule ?? true,
1367
1383
  useNuxtSSR: cliOptions.nuxtSSR ?? true,
1368
- useNuxtSSRClientHints: cliOptions.nuxtSSRClientHints ?? (cliOptions.nuxtModule && cliOptions.nuxtSSR)
1384
+ useNuxtSSRClientHints: cliOptions.nuxtSSRClientHints ?? (cliOptions.nuxtModule && cliOptions.nuxtSSR),
1385
+ vuetifyVersion: cliOptions.v4 ? "4.x" : void 0
1369
1386
  };
1370
1387
  }
1371
1388
 
@@ -1408,7 +1425,7 @@ var deepMerge = (...sources) => sources.reduce((acc, curr) => {
1408
1425
 
1409
1426
  // src/utils/renderTemplate.ts
1410
1427
  import { copyFileSync, mkdirSync, readdirSync as readdirSync3, readFileSync, statSync, writeFileSync, existsSync as existsSync4 } from "node:fs";
1411
- import { basename as basename2, dirname as dirname2, resolve as resolve5 } from "node:path";
1428
+ import { basename as basename2, dirname as dirname2, extname as extname2, resolve as resolve5 } from "node:path";
1412
1429
  function mergePkg(source, destination) {
1413
1430
  const target = existsSync4(destination) ? JSON.parse(readFileSync(destination, "utf8")) : {};
1414
1431
  const src = JSON.parse(readFileSync(source, "utf8"));
@@ -1421,28 +1438,37 @@ function mergePkg(source, destination) {
1421
1438
  }
1422
1439
  writeFileSync(destination, JSON.stringify(mergedPkg, null, 2) + "\n");
1423
1440
  }
1424
- function renderDirectory(source, destination) {
1441
+ function renderDirectory(source, destination, options) {
1425
1442
  mkdirSync(destination, { recursive: true });
1426
1443
  for (const path4 of readdirSync3(source)) {
1427
- renderTemplate(resolve5(source, path4), resolve5(destination, path4));
1444
+ renderTemplate(resolve5(source, path4), resolve5(destination, path4), options);
1428
1445
  }
1429
1446
  }
1430
- function renderFile(source, destination) {
1447
+ var binaryExtensions = /* @__PURE__ */ new Set([".png", ".jpg", ".jpeg", ".gif", ".ico", ".woff", ".woff2", ".ttf", ".eot", ".svg"]);
1448
+ function renderFile(source, destination, options) {
1431
1449
  const filename = basename2(source);
1432
1450
  if (filename.startsWith("_")) {
1433
1451
  destination = resolve5(dirname2(destination), filename.replace("_", "."));
1434
1452
  }
1435
1453
  if (filename === "package.json") {
1436
1454
  mergePkg(source, destination);
1437
- } else {
1438
- copyFileSync(source, destination);
1455
+ return;
1439
1456
  }
1457
+ if (options?.replace && !binaryExtensions.has(extname2(filename))) {
1458
+ let content = readFileSync(source, "utf8");
1459
+ for (const [key, value] of Object.entries(options.replace)) {
1460
+ content = content.replaceAll(key, value);
1461
+ }
1462
+ writeFileSync(destination, content);
1463
+ return;
1464
+ }
1465
+ copyFileSync(source, destination);
1440
1466
  }
1441
- function renderTemplate(source, destination) {
1467
+ function renderTemplate(source, destination, options) {
1442
1468
  if (statSync(source).isDirectory()) {
1443
- renderDirectory(source, destination);
1469
+ renderDirectory(source, destination, options);
1444
1470
  } else {
1445
- renderFile(source, destination);
1471
+ renderFile(source, destination, options);
1446
1472
  }
1447
1473
  }
1448
1474
 
@@ -1647,15 +1673,19 @@ function getPaths(rootPath, templateDir) {
1647
1673
  var versions = {
1648
1674
  "vuetify": "^3.9.1",
1649
1675
  "typescript": "^5.8.3",
1650
- "vue-tsc": "^3.0.1",
1676
+ "vue-tsc": "^3.2.0",
1651
1677
  "sass-embedded": "^1.89.2",
1652
1678
  "@vuetify/loader-shared": "^2.1.0",
1653
1679
  "vite-plugin-vuetify": "^2.1.1",
1654
- "vuetify-nuxt-module": "^0.18.7",
1680
+ "vuetify-nuxt-module": "^0.19.1",
1655
1681
  "upath": "^2.0.1",
1656
1682
  "@mdi/font": "^7.4.47",
1657
1683
  "@nuxt/fonts": "^0.11.4"
1658
1684
  };
1685
+ var versionsV4 = {
1686
+ ...versions,
1687
+ vuetify: "^4.0.0-alpha.1"
1688
+ };
1659
1689
 
1660
1690
  // node_modules/.pnpm/package-manager-detector@1.3.0/node_modules/package-manager-detector/dist/constants.mjs
1661
1691
  var AGENTS = [
@@ -1862,11 +1892,13 @@ function configurePackageJson({
1862
1892
  projectName,
1863
1893
  projectRoot,
1864
1894
  useNuxtModule,
1865
- nuxtPreset
1895
+ nuxtPreset,
1896
+ vuetifyVersion
1866
1897
  }) {
1867
1898
  const packageJson = path3.join(projectRoot, "package.json");
1868
1899
  const pkg = JSON.parse(fs3.readFileSync(path3.join(projectRoot, "package.json"), "utf8"));
1869
1900
  pkg.name = projectName;
1901
+ const v = vuetifyVersion === "4.x" ? versionsV4 : versions;
1870
1902
  const scripts = [
1871
1903
  ["prepare", "nuxt prepare"],
1872
1904
  ["typecheck", "nuxt typecheck"]
@@ -1875,22 +1907,22 @@ function configurePackageJson({
1875
1907
  scripts.push(["lint", "eslint ."], ["lint:fix", "eslint . --fix"]);
1876
1908
  }
1877
1909
  const dependencies = [
1878
- ["vuetify", versions.vuetify]
1910
+ ["vuetify", v.vuetify]
1879
1911
  ];
1880
1912
  if (dependencies.length > 0) {
1881
1913
  addPackageObject("dependencies", dependencies, pkg);
1882
1914
  }
1883
1915
  const devDependencies = [
1884
- ["@mdi/font", versions["@mdi/font"]],
1885
- ["@nuxt/fonts", versions["@nuxt/fonts"]],
1886
- ["sass-embedded", versions["sass-embedded"]],
1887
- ["typescript", versions.typescript],
1888
- ["vue-tsc", versions["vue-tsc"]]
1916
+ ["@mdi/font", v["@mdi/font"]],
1917
+ ["@nuxt/fonts", v["@nuxt/fonts"]],
1918
+ ["sass-embedded", v["sass-embedded"]],
1919
+ ["typescript", v.typescript],
1920
+ ["vue-tsc", v["vue-tsc"]]
1889
1921
  ];
1890
1922
  if (useNuxtModule) {
1891
- devDependencies.push(["vuetify-nuxt-module", versions["vuetify-nuxt-module"]]);
1923
+ devDependencies.push(["vuetify-nuxt-module", v["vuetify-nuxt-module"]]);
1892
1924
  } else {
1893
- devDependencies.push(["upath", versions["upath"]], ["@vuetify/loader-shared", versions["@vuetify/loader-shared"]], ["vite-plugin-vuetify", versions["vite-plugin-vuetify"]]);
1925
+ devDependencies.push(["upath", v["upath"]], ["@vuetify/loader-shared", v["@vuetify/loader-shared"]], ["vite-plugin-vuetify", v["vite-plugin-vuetify"]]);
1894
1926
  }
1895
1927
  if (devDependencies.length > 0) {
1896
1928
  addPackageObject("devDependencies", devDependencies, pkg);
@@ -2121,7 +2153,8 @@ ${banner}
2121
2153
  installDependencies: cliContext.installDependencies,
2122
2154
  useNuxtModule: cliContext.useNuxtModule,
2123
2155
  useNuxtSSR: cliContext.useNuxtSSR,
2124
- useNuxtSSRClientHints: cliContext.useNuxtSSRClientHints
2156
+ useNuxtSSRClientHints: cliContext.useNuxtSSRClientHints,
2157
+ vuetifyVersion: cliContext.vuetifyVersion
2125
2158
  };
2126
2159
  const finalContext = resolveNonInteractiveContext(initialContext);
2127
2160
  await createProject(finalContext);
@@ -2156,7 +2189,8 @@ async function createProject(finalContext) {
2156
2189
  nuxtPreset: preset,
2157
2190
  useNuxtModule,
2158
2191
  useNuxtSSR,
2159
- useNuxtSSRClientHints
2192
+ useNuxtSSRClientHints,
2193
+ vuetifyVersion: finalContext.vuetifyVersion
2160
2194
  });
2161
2195
  } else {
2162
2196
  mkdirSync2(projectRoot);
@@ -2164,18 +2198,29 @@ async function createProject(finalContext) {
2164
2198
  console.log("\n\u25CC Generating scaffold...");
2165
2199
  const jsOrTs = useTypeScript ? "typescript" : "javascript";
2166
2200
  const templatePath = resolve6(dirname3(fileURLToPath(import.meta.url)), "../template", jsOrTs);
2167
- renderTemplate(resolve6(templatePath, "default"), projectRoot);
2201
+ const replace = {
2202
+ "{{VUETIFY_VERSION}}": finalContext.vuetifyVersion === "4.x" ? "4 (Alpha)" : "3"
2203
+ };
2204
+ renderTemplate(resolve6(templatePath, "default"), projectRoot, { replace });
2168
2205
  if (["base", "essentials"].includes(usePreset)) {
2169
- renderTemplate(resolve6(templatePath, "base"), projectRoot);
2206
+ renderTemplate(resolve6(templatePath, "base"), projectRoot, { replace });
2170
2207
  }
2171
2208
  if (["essentials", "recommended"].includes(usePreset)) {
2172
- renderTemplate(resolve6(templatePath, "essentials"), projectRoot);
2209
+ renderTemplate(resolve6(templatePath, "essentials"), projectRoot, { replace });
2173
2210
  }
2174
2211
  if (usePackageManager && installDeps) {
2175
2212
  console.log(`\u25CC Installing dependencies with ${usePackageManager}...
2176
2213
  `);
2177
2214
  await installDependencies2(projectRoot, usePackageManager);
2178
2215
  }
2216
+ if (finalContext.vuetifyVersion === "4.x") {
2217
+ const packageJsonPath = resolve6(projectRoot, "package.json");
2218
+ const packageJson = JSON.parse(readFileSync2(packageJsonPath, "utf8"));
2219
+ if (packageJson.dependencies?.vuetify) {
2220
+ packageJson.dependencies.vuetify = versionsV4.vuetify;
2221
+ }
2222
+ writeFileSync2(packageJsonPath, JSON.stringify(packageJson, null, 2) + "\n");
2223
+ }
2179
2224
  }
2180
2225
  console.log(`
2181
2226
  ${projectName} has been generated at ${projectRoot}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-vuetify",
3
- "version": "2.7.2",
3
+ "version": "2.8.0-beta.1",
4
4
  "author": "Elijah Kotyluk <elijah@elijahkotyluk.com>",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <v-container class="fill-height" max-width="900">
2
+ <v-container class="fill-height d-flex align-center" max-width="900">
3
3
  <div>
4
4
  <v-img
5
5
  class="mb-4"
@@ -9,7 +9,7 @@
9
9
 
10
10
  <div class="mb-8 text-center">
11
11
  <div class="text-body-2 font-weight-light mb-n1">Welcome to</div>
12
- <h1 class="text-h2 font-weight-bold">Vuetify</h1>
12
+ <h1 class="text-h2 my-0 font-weight-bold">Vuetify</h1>
13
13
  </div>
14
14
 
15
15
  <v-row>
@@ -0,0 +1,3 @@
1
+ {
2
+ "recommendations": ["Vue.volar"]
3
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "vue.hover.rich": true
3
+ }
@@ -25,7 +25,7 @@ After completing the installation, your environment is ready for Vuetify develop
25
25
 
26
26
  ## ✨ Features
27
27
 
28
- - 🖼️ **Optimized Front-End Stack**: Leverage the latest Vue 3 and Vuetify 3 for a modern, reactive UI development experience. [Vue 3](https://v3.vuejs.org/) | [Vuetify 3](https://vuetifyjs.com/en/)
28
+ - 🖼️ **Optimized Front-End Stack**: Leverage the latest Vue 3 and Vuetify {{VUETIFY_VERSION}} for a modern, reactive UI development experience. [Vue 3](https://v3.vuejs.org/) | [Vuetify {{VUETIFY_VERSION}}](https://vuetifyjs.com/en/)
29
29
  - 🗃️ **State Management**: Integrated with [Pinia](https://pinia.vuejs.org/), the intuitive, modular state management solution for Vue.
30
30
  - 🚦 **Routing and Layouts**: Utilizes Vue Router for SPA navigation and vite-plugin-vue-layouts for organizing Vue file layouts. [Vue Router](https://router.vuejs.org/) | [vite-plugin-vue-layouts](https://github.com/JohnCampionJr/vite-plugin-vue-layouts)
31
31
  - ⚡ **Next-Gen Tooling**: Powered by Vite, experience fast cold starts and instant HMR (Hot Module Replacement). [Vite](https://vitejs.dev/)
@@ -4,7 +4,7 @@
4
4
  <meta charset="UTF-8">
5
5
  <link rel="icon" href="/favicon.ico">
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
- <title>Welcome to Vuetify 3</title>
7
+ <title>Welcome to Vuetify {{VUETIFY_VERSION}}</title>
8
8
  </head>
9
9
  <body>
10
10
  <div id="app"></div>
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <v-container class="fill-height" max-width="900">
2
+ <v-container class="fill-height d-flex align-center" max-width="900">
3
3
  <div>
4
4
  <v-img
5
5
  class="mb-4"
@@ -9,7 +9,7 @@
9
9
 
10
10
  <div class="mb-8 text-center">
11
11
  <div class="text-body-2 font-weight-light mb-n1">Welcome to</div>
12
- <h1 class="text-h2 font-weight-bold">Vuetify</h1>
12
+ <h1 class="text-h2 my-0 font-weight-bold">Vuetify</h1>
13
13
  </div>
14
14
 
15
15
  <v-row>
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <v-container class="fill-height" max-width="900">
2
+ <v-container class="fill-height d-flex align-center" max-width="900">
3
3
  <div>
4
4
  <v-img
5
5
  class="mb-4"
@@ -9,7 +9,7 @@
9
9
 
10
10
  <div class="mb-8 text-center">
11
11
  <div class="text-body-2 font-weight-light mb-n1">Welcome to</div>
12
- <h1 class="text-h2 font-weight-bold">Vuetify</h1>
12
+ <h1 class="text-h2 my-0 font-weight-bold">Vuetify</h1>
13
13
  </div>
14
14
 
15
15
  <v-row>
@@ -0,0 +1,3 @@
1
+ {
2
+ "recommendations": ["Vue.volar"]
3
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "vue.hover.rich": true
3
+ }
@@ -25,7 +25,7 @@ After completing the installation, your environment is ready for Vuetify develop
25
25
 
26
26
  ## ✨ Features
27
27
 
28
- - 🖼️ **Optimized Front-End Stack**: Leverage the latest Vue 3 and Vuetify 3 for a modern, reactive UI development experience. [Vue 3](https://v3.vuejs.org/) | [Vuetify 3](https://vuetifyjs.com/en/)
28
+ - 🖼️ **Optimized Front-End Stack**: Leverage the latest Vue 3 and Vuetify {{VUETIFY_VERSION}} for a modern, reactive UI development experience. [Vue 3](https://v3.vuejs.org/) | [Vuetify {{VUETIFY_VERSION}}](https://vuetifyjs.com/en/)
29
29
  - 🗃️ **State Management**: Integrated with [Pinia](https://pinia.vuejs.org/), the intuitive, modular state management solution for Vue.
30
30
  - 🚦 **Routing and Layouts**: Utilizes Vue Router for SPA navigation and vite-plugin-vue-layouts-next for organizing Vue file layouts. [Vue Router](https://router.vuejs.org/) | [vite-plugin-vue-layouts-next](https://github.com/loicduong/vite-plugin-vue-layouts-next)
31
31
  - 💻 **Enhanced Development Experience**: Benefit from TypeScript's static type checking and the ESLint plugin suite for Vue, ensuring code quality and consistency. [TypeScript](https://www.typescriptlang.org/) | [ESLint Plugin Vue](https://eslint.vuejs.org/)
@@ -4,7 +4,7 @@
4
4
  <meta charset="UTF-8">
5
5
  <link rel="icon" href="/favicon.ico">
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
- <title>Welcome to Vuetify 3</title>
7
+ <title>Welcome to Vuetify {{VUETIFY_VERSION}}</title>
8
8
  </head>
9
9
  <body>
10
10
  <div id="app"></div>
@@ -27,6 +27,6 @@
27
27
  "unplugin-vue-components": "^29.0.0",
28
28
  "vite-plugin-vuetify": "^2.1.2",
29
29
  "vite": "^7.1.5",
30
- "vue-tsc": "^3.0.7"
30
+ "vue-tsc": "^3.2.0"
31
31
  }
32
32
  }
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <v-container class="fill-height" max-width="900">
2
+ <v-container class="fill-height d-flex align-center" max-width="900">
3
3
  <div>
4
4
  <v-img
5
5
  class="mb-4"
@@ -9,7 +9,7 @@
9
9
 
10
10
  <div class="mb-8 text-center">
11
11
  <div class="text-body-2 font-weight-light mb-n1">Welcome to</div>
12
- <h1 class="text-h2 font-weight-bold">Vuetify</h1>
12
+ <h1 class="text-h2 my-0 font-weight-bold">Vuetify</h1>
13
13
  </div>
14
14
 
15
15
  <v-row>
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <v-container class="fill-height" max-width="900">
2
+ <v-container class="fill-height d-flex align-center" max-width="900">
3
3
  <div>
4
4
  <v-img
5
5
  class="mb-4"
@@ -9,7 +9,7 @@
9
9
 
10
10
  <div class="mb-8 text-center">
11
11
  <div class="text-body-2 font-weight-light mb-n1">Welcome to</div>
12
- <h1 class="text-h2 font-weight-bold">Vuetify</h1>
12
+ <h1 class="text-h2 my-0 font-weight-bold">Vuetify</h1>
13
13
  </div>
14
14
 
15
15
  <v-row>