create-vuetify 3.1.3-next.1 → 3.1.4
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 +319 -246
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { i as resolve$1$1, n as dirname$1, t as basename$1 } from "./nypm-DFp9HL5N.mjs";
|
|
2
|
+
import { i as resolve$1$1, n as dirname$1$1, t as basename$1 } from "./nypm-DFp9HL5N.mjs";
|
|
3
3
|
import { createRequire } from "node:module";
|
|
4
4
|
import e from "node:assert";
|
|
5
5
|
import { format, inspect, parseArgs, promisify, stripVTControlCharacters } from "node:util";
|
|
@@ -7,7 +7,7 @@ import P, { stdin, stdout } from "node:process";
|
|
|
7
7
|
import * as k$1 from "node:readline";
|
|
8
8
|
import c from "node:readline";
|
|
9
9
|
import { ReadStream } from "node:tty";
|
|
10
|
-
import fs, { appendFileSync, cpSync, createWriteStream, existsSync, lstatSync, mkdirSync, mkdtempSync, readFileSync, readdirSync, realpathSync, renameSync, rmSync, statSync,
|
|
10
|
+
import fs, { appendFileSync, cpSync, createWriteStream, existsSync, lstatSync, mkdirSync, mkdtempSync, readFileSync, readdirSync, realpathSync, renameSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
11
11
|
import path, { dirname, isAbsolute, join } from "node:path";
|
|
12
12
|
import fs$1, { constants, mkdir, readFile, rm, writeFile } from "node:fs/promises";
|
|
13
13
|
import { findPackage, readPackage, readPackageJSON, updatePackage, writePackageJSON } from "pkg-types";
|
|
@@ -9870,7 +9870,7 @@ var en_default = {
|
|
|
9870
9870
|
"checking": "Checking for updates...",
|
|
9871
9871
|
"intro": "Checking for updates...",
|
|
9872
9872
|
"not_installed": "Vuetify is not installed in this project.",
|
|
9873
|
-
"deprecated_v2": "Vuetify 2 is deprecated. Please consider upgrading to Vuetify
|
|
9873
|
+
"deprecated_v2": "Vuetify 2 is deprecated. Please consider upgrading to Vuetify 4.",
|
|
9874
9874
|
"outdated_v1": "Vuetify 1 is out of date. Please upgrade.",
|
|
9875
9875
|
"updated": "Updated %{pkg}",
|
|
9876
9876
|
"failed": "Failed to update %{pkg}",
|
|
@@ -9945,15 +9945,16 @@ var en_default = {
|
|
|
9945
9945
|
"hint": "Headless Component Library"
|
|
9946
9946
|
}
|
|
9947
9947
|
},
|
|
9948
|
-
"vuetify_version": {
|
|
9949
|
-
"select": "Select Vuetify version:",
|
|
9950
|
-
"3_x": "Vuetify 3 (latest)",
|
|
9951
|
-
"4_x": "Vuetify 4 (beta)"
|
|
9952
|
-
},
|
|
9953
9948
|
"css_framework": {
|
|
9954
9949
|
"select": "Which CSS framework?",
|
|
9955
9950
|
"unocss": { "hint": "Instant on-demand atomic CSS engine" },
|
|
9956
|
-
"
|
|
9951
|
+
"unocss_wind4": { "label": "UnoCSS with Wind4 preset" },
|
|
9952
|
+
"unocss_vuetify": { "label": "UnoCSS with Vuetify preset" },
|
|
9953
|
+
"tailwindcss": {
|
|
9954
|
+
"label": "Tailwind CSS",
|
|
9955
|
+
"hint": "A utility-first CSS framework"
|
|
9956
|
+
},
|
|
9957
|
+
"status": { "not_supported": "CSS framework %{css} is not supported for %{vuetify} yet." },
|
|
9957
9958
|
"none": "None"
|
|
9958
9959
|
},
|
|
9959
9960
|
"typescript": { "use": "Use TypeScript?" },
|
|
@@ -9972,16 +9973,16 @@ var en_default = {
|
|
|
9972
9973
|
},
|
|
9973
9974
|
"features": {
|
|
9974
9975
|
"select": "Select features to install: %{hint}",
|
|
9976
|
+
"router": {
|
|
9977
|
+
"label": "Router",
|
|
9978
|
+
"hint": "Configure Vue Router"
|
|
9979
|
+
},
|
|
9975
9980
|
"pinia": { "label": "Pinia" },
|
|
9976
9981
|
"eslint": {
|
|
9977
9982
|
"label": "ESLint",
|
|
9978
9983
|
"hint": "with eslint-config-vuetify"
|
|
9979
9984
|
},
|
|
9980
9985
|
"i18n": { "label": "I18n" },
|
|
9981
|
-
"vuetify_nuxt_module": {
|
|
9982
|
-
"label": "Vuetify Nuxt Module",
|
|
9983
|
-
"hint": "Use vuetify-nuxt-module instead of local plugin"
|
|
9984
|
-
},
|
|
9985
9986
|
"mcp": {
|
|
9986
9987
|
"label": "MCP",
|
|
9987
9988
|
"hint": "with @vuetify/mcp and @intellectronica/ruler"
|
|
@@ -10052,8 +10053,7 @@ var en_default = {
|
|
|
10052
10053
|
"platform": { "description": "The framework to use" },
|
|
10053
10054
|
"verbose": { "description": "Output verbose logs" },
|
|
10054
10055
|
"version": { "description": "The Vuetify version to check documentation for" },
|
|
10055
|
-
"preset": { "description": "Path to a preset file to load" }
|
|
10056
|
-
"vuetifyVersion": { "description": "Vuetify version" }
|
|
10056
|
+
"preset": { "description": "Path to a preset file to load" }
|
|
10057
10057
|
},
|
|
10058
10058
|
cli: {
|
|
10059
10059
|
"main": { "description": "Unified CLI for Vuetify" },
|
|
@@ -10121,7 +10121,7 @@ var ru_default = {
|
|
|
10121
10121
|
"checking": "Проверка обновлений...",
|
|
10122
10122
|
"intro": "Проверка обновлений...",
|
|
10123
10123
|
"not_installed": "Vuetify не установлен в этом проекте.",
|
|
10124
|
-
"deprecated_v2": "Vuetify 2 устарел. Пожалуйста, рассмотрите возможность обновления до Vuetify
|
|
10124
|
+
"deprecated_v2": "Vuetify 2 устарел. Пожалуйста, рассмотрите возможность обновления до Vuetify 4.",
|
|
10125
10125
|
"outdated_v1": "Vuetify 1 устарел. Пожалуйста, обновитесь.",
|
|
10126
10126
|
"updated": "Обновлен %{pkg}",
|
|
10127
10127
|
"failed": "Не удалось обновить %{pkg}",
|
|
@@ -10191,11 +10191,6 @@ var ru_default = {
|
|
|
10191
10191
|
"hint": "Библиотека headless компонентов"
|
|
10192
10192
|
}
|
|
10193
10193
|
},
|
|
10194
|
-
"vuetify_version": {
|
|
10195
|
-
"select": "Выберите версию Vuetify:",
|
|
10196
|
-
"3_x": "Vuetify 3 (стабильная)",
|
|
10197
|
-
"4_x": "Vuetify 4 (бета)"
|
|
10198
|
-
},
|
|
10199
10194
|
"css_framework": {
|
|
10200
10195
|
"select": "Какой фреймворк CSS вы хотите использовать?",
|
|
10201
10196
|
"none": "Никакой",
|
|
@@ -10203,10 +10198,19 @@ var ru_default = {
|
|
|
10203
10198
|
"label": "UnoCSS",
|
|
10204
10199
|
"hint": "Быстрая и гибкая система стилей"
|
|
10205
10200
|
},
|
|
10201
|
+
"unocss_wind4": {
|
|
10202
|
+
"label": "UnoCSS с пресетом Wind4",
|
|
10203
|
+
"hint": "скоро"
|
|
10204
|
+
},
|
|
10205
|
+
"unocss_vuetify": {
|
|
10206
|
+
"label": "UnoCSS с пресетом Vuetify",
|
|
10207
|
+
"hint": "скоро"
|
|
10208
|
+
},
|
|
10206
10209
|
"tailwindcss": {
|
|
10207
10210
|
"label": "Tailwind CSS",
|
|
10208
10211
|
"hint": "Атомарный CSS-фреймворк"
|
|
10209
|
-
}
|
|
10212
|
+
},
|
|
10213
|
+
"status": { "not_supported": "CSS-фреймворк %{css} пока не поддерживается для %{vuetify}." }
|
|
10210
10214
|
},
|
|
10211
10215
|
"typescript": { "use": "Использовать TypeScript?" },
|
|
10212
10216
|
"router": {
|
|
@@ -10224,16 +10228,16 @@ var ru_default = {
|
|
|
10224
10228
|
},
|
|
10225
10229
|
"features": {
|
|
10226
10230
|
"select": "Выберите функции для установки: %{hint}",
|
|
10231
|
+
"router": {
|
|
10232
|
+
"label": "Роутер",
|
|
10233
|
+
"hint": "Добавить Vue Router"
|
|
10234
|
+
},
|
|
10227
10235
|
"pinia": { "label": "Pinia" },
|
|
10228
10236
|
"eslint": {
|
|
10229
10237
|
"label": "ESLint",
|
|
10230
10238
|
"hint": "с eslint-config-vuetify"
|
|
10231
10239
|
},
|
|
10232
10240
|
"i18n": { "label": "I18n" },
|
|
10233
|
-
"vuetify_nuxt_module": {
|
|
10234
|
-
"label": "Vuetify Nuxt Module",
|
|
10235
|
-
"hint": "Использовать vuetify-nuxt-module вместо локального плагина"
|
|
10236
|
-
},
|
|
10237
10241
|
"mcp": {
|
|
10238
10242
|
"label": "MCP",
|
|
10239
10243
|
"hint": "с @vuetify/mcp и @intellectronica/ruler"
|
|
@@ -10299,8 +10303,7 @@ var ru_default = {
|
|
|
10299
10303
|
"platform": { "description": "Фреймворк для использования" },
|
|
10300
10304
|
"verbose": { "description": "Вывести подробные логи" },
|
|
10301
10305
|
"preset": { "description": "Путь к файлу пресета для загрузки" },
|
|
10302
|
-
"version": { "description": "Версия Vuetify для просмотра документации" }
|
|
10303
|
-
"vuetifyVersion": { "description": "Версия Vuetify" }
|
|
10306
|
+
"version": { "description": "Версия Vuetify для просмотра документации" }
|
|
10304
10307
|
},
|
|
10305
10308
|
cli: {
|
|
10306
10309
|
"main": { "description": "CLI для Vuetify" },
|
|
@@ -10325,6 +10328,7 @@ const i18n$2 = new import_require.I18n({
|
|
|
10325
10328
|
ru: ru_default
|
|
10326
10329
|
}, {
|
|
10327
10330
|
defaultLocale: "en",
|
|
10331
|
+
enableFallback: true,
|
|
10328
10332
|
locale: normalizeLocale$1(getCurrentLocale())
|
|
10329
10333
|
});
|
|
10330
10334
|
|
|
@@ -10365,7 +10369,7 @@ function projectArgs(options) {
|
|
|
10365
10369
|
css: {
|
|
10366
10370
|
type: "string",
|
|
10367
10371
|
description: i18n$1.t("args.css.description"),
|
|
10368
|
-
valueHint: "unocss | tailwindcss | none"
|
|
10372
|
+
valueHint: "unocss | unocss-wind4 | unocss-vuetify | tailwindcss | none"
|
|
10369
10373
|
},
|
|
10370
10374
|
packageManager: {
|
|
10371
10375
|
type: "string",
|
|
@@ -10402,10 +10406,6 @@ function projectArgs(options) {
|
|
|
10402
10406
|
preset: {
|
|
10403
10407
|
type: "string",
|
|
10404
10408
|
description: i18n$1.t("args.preset.description")
|
|
10405
|
-
},
|
|
10406
|
-
vuetifyVersion: {
|
|
10407
|
-
type: "string",
|
|
10408
|
-
description: i18n$1.t("args.vuetifyVersion.description")
|
|
10409
10409
|
}
|
|
10410
10410
|
};
|
|
10411
10411
|
if (options?.exclude) for (const key of options.exclude) delete args[key];
|
|
@@ -12389,6 +12389,11 @@ const relative = function(from, to) {
|
|
|
12389
12389
|
}
|
|
12390
12390
|
return [..._from.map(() => ".."), ..._to].join("/");
|
|
12391
12391
|
};
|
|
12392
|
+
const dirname$1 = function(p) {
|
|
12393
|
+
const segments = normalizeWindowsPath(p).replace(/\/$/, "").split("/").slice(0, -1);
|
|
12394
|
+
if (segments.length === 1 && _DRIVE_LETTER_RE.test(segments[0])) segments[0] += "/";
|
|
12395
|
+
return segments.join("/") || (isAbsolute$1(p) ? "/" : ".");
|
|
12396
|
+
};
|
|
12392
12397
|
|
|
12393
12398
|
//#endregion
|
|
12394
12399
|
//#region ../../node_modules/.pnpm/eslint-visitor-keys@4.2.1/node_modules/eslint-visitor-keys/dist/eslint-visitor-keys.cjs
|
|
@@ -27228,35 +27233,42 @@ async function prompt(args, cwd = process.cwd()) {
|
|
|
27228
27233
|
}]
|
|
27229
27234
|
});
|
|
27230
27235
|
},
|
|
27231
|
-
|
|
27232
|
-
if ((results.type || args.type) !== "vuetify") return Promise.resolve(void 0);
|
|
27233
|
-
if (args.vuetifyVersion) return Promise.resolve(args.vuetifyVersion);
|
|
27234
|
-
if (!args.interactive) return Promise.resolve("3.x");
|
|
27235
|
-
return qt({
|
|
27236
|
-
message: i18n$1.t("prompts.vuetify_version.select"),
|
|
27237
|
-
initialValue: "3.x",
|
|
27238
|
-
options: [{
|
|
27239
|
-
label: i18n$1.t("prompts.vuetify_version.3_x"),
|
|
27240
|
-
value: "3.x"
|
|
27241
|
-
}, {
|
|
27242
|
-
label: i18n$1.t("prompts.vuetify_version.4_x"),
|
|
27243
|
-
value: "4.x"
|
|
27244
|
-
}]
|
|
27245
|
-
});
|
|
27246
|
-
},
|
|
27247
|
-
cssFramework: ({ results }) => {
|
|
27236
|
+
css: ({ results }) => {
|
|
27248
27237
|
const type = results.type || args.type;
|
|
27249
|
-
|
|
27238
|
+
const platform = results.platform || args.platform;
|
|
27250
27239
|
if (args.css) {
|
|
27251
|
-
if (args.css
|
|
27252
|
-
if (args.css.
|
|
27253
|
-
return Promise.resolve(
|
|
27240
|
+
if (type === "vuetify" && args.css === "unocss") return Promise.resolve("unocss-vuetify");
|
|
27241
|
+
if (type === "vuetify0" && args.css.startsWith("unocss-")) R.warn("v0 supports only --css with \"unocss | tailwindcss | none\", fallback to \"unocss\"");
|
|
27242
|
+
return Promise.resolve(args.css);
|
|
27254
27243
|
}
|
|
27255
27244
|
if (!args.interactive) return Promise.resolve("none");
|
|
27245
|
+
if (type === "vuetify" && platform === "nuxt") return qt({
|
|
27246
|
+
message: i18n$1.t("prompts.css_framework.select"),
|
|
27247
|
+
initialValue: "none",
|
|
27248
|
+
options: [
|
|
27249
|
+
{
|
|
27250
|
+
label: i18n$1.t("prompts.css_framework.none"),
|
|
27251
|
+
value: "none"
|
|
27252
|
+
},
|
|
27253
|
+
{
|
|
27254
|
+
label: "Tailwind CSS",
|
|
27255
|
+
value: "tailwindcss",
|
|
27256
|
+
hint: i18n$1.t("prompts.css_framework.tailwindcss.hint")
|
|
27257
|
+
},
|
|
27258
|
+
{
|
|
27259
|
+
label: i18n$1.t("prompts.css_framework.unocss_wind4.label"),
|
|
27260
|
+
value: "unocss-wind4"
|
|
27261
|
+
},
|
|
27262
|
+
{
|
|
27263
|
+
label: i18n$1.t("prompts.css_framework.unocss_vuetify.label"),
|
|
27264
|
+
value: "unocss-vuetify"
|
|
27265
|
+
}
|
|
27266
|
+
]
|
|
27267
|
+
});
|
|
27256
27268
|
return qt({
|
|
27257
27269
|
message: i18n$1.t("prompts.css_framework.select"),
|
|
27258
27270
|
initialValue: type === "vuetify0" ? "unocss" : "none",
|
|
27259
|
-
options: [
|
|
27271
|
+
options: type === "vuetify0" ? [
|
|
27260
27272
|
{
|
|
27261
27273
|
label: "UnoCSS",
|
|
27262
27274
|
value: "unocss",
|
|
@@ -27271,46 +27283,39 @@ async function prompt(args, cwd = process.cwd()) {
|
|
|
27271
27283
|
label: i18n$1.t("prompts.css_framework.none"),
|
|
27272
27284
|
value: "none"
|
|
27273
27285
|
}
|
|
27274
|
-
]
|
|
27275
|
-
});
|
|
27276
|
-
},
|
|
27277
|
-
typescript: ({ results }) => {
|
|
27278
|
-
if ((results.platform || args.platform) === "vue" && args.typescript === void 0) return Mt({
|
|
27279
|
-
message: i18n$1.t("prompts.typescript.use"),
|
|
27280
|
-
initialValue: true
|
|
27281
|
-
});
|
|
27282
|
-
return Promise.resolve(args.typescript ?? true);
|
|
27283
|
-
},
|
|
27284
|
-
router: ({ results }) => {
|
|
27285
|
-
if (args.router) return Promise.resolve(args.router);
|
|
27286
|
-
if ((results.platform || args.platform) !== "vue") return Promise.resolve("none");
|
|
27287
|
-
if (!args.interactive) return Promise.resolve("none");
|
|
27288
|
-
return qt({
|
|
27289
|
-
message: i18n$1.t("prompts.router.select"),
|
|
27290
|
-
initialValue: "router",
|
|
27291
|
-
options: [
|
|
27286
|
+
] : [
|
|
27292
27287
|
{
|
|
27293
|
-
label: i18n$1.t("prompts.
|
|
27288
|
+
label: i18n$1.t("prompts.css_framework.none"),
|
|
27294
27289
|
value: "none"
|
|
27295
27290
|
},
|
|
27296
27291
|
{
|
|
27297
|
-
label:
|
|
27298
|
-
value: "
|
|
27299
|
-
hint: i18n$1.t("prompts.
|
|
27292
|
+
label: "Tailwind CSS",
|
|
27293
|
+
value: "tailwindcss",
|
|
27294
|
+
hint: i18n$1.t("prompts.css_framework.tailwindcss.hint")
|
|
27300
27295
|
},
|
|
27301
27296
|
{
|
|
27302
|
-
label: i18n$1.t("prompts.
|
|
27303
|
-
value: "
|
|
27304
|
-
|
|
27297
|
+
label: i18n$1.t("prompts.css_framework.unocss_wind4.label"),
|
|
27298
|
+
value: "unocss-wind4"
|
|
27299
|
+
},
|
|
27300
|
+
{
|
|
27301
|
+
label: i18n$1.t("prompts.css_framework.unocss_vuetify.label"),
|
|
27302
|
+
value: "unocss-vuetify"
|
|
27305
27303
|
}
|
|
27306
27304
|
]
|
|
27307
27305
|
});
|
|
27308
27306
|
},
|
|
27307
|
+
typescript: ({ results }) => {
|
|
27308
|
+
if ((results.platform || args.platform) === "vue" && args.typescript === void 0) return Mt({
|
|
27309
|
+
message: i18n$1.t("prompts.typescript.use"),
|
|
27310
|
+
initialValue: true
|
|
27311
|
+
});
|
|
27312
|
+
return Promise.resolve(args.typescript ?? true);
|
|
27313
|
+
},
|
|
27309
27314
|
features: ({ results }) => {
|
|
27310
|
-
if (args.features) return Promise.resolve(args.features
|
|
27315
|
+
if (args.features) return Promise.resolve(args.features);
|
|
27311
27316
|
if (!args.interactive) return Promise.resolve([]);
|
|
27312
27317
|
const platform = results.platform || args.platform;
|
|
27313
|
-
|
|
27318
|
+
results.type || args.type;
|
|
27314
27319
|
return platform === "vue" ? Lt({
|
|
27315
27320
|
message: i18n$1.t("prompts.features.select", { hint: dim("↑/↓ to navigate, space to select, a to toggle all, enter to confirm") }),
|
|
27316
27321
|
options: [
|
|
@@ -27319,6 +27324,11 @@ async function prompt(args, cwd = process.cwd()) {
|
|
|
27319
27324
|
value: "eslint",
|
|
27320
27325
|
hint: i18n$1.t("prompts.features.eslint.hint")
|
|
27321
27326
|
},
|
|
27327
|
+
{
|
|
27328
|
+
label: i18n$1.t("prompts.features.router.label"),
|
|
27329
|
+
value: "router",
|
|
27330
|
+
hint: i18n$1.t("prompts.features.router.hint")
|
|
27331
|
+
},
|
|
27322
27332
|
{
|
|
27323
27333
|
label: i18n$1.t("prompts.features.mcp.label"),
|
|
27324
27334
|
value: "mcp",
|
|
@@ -27343,11 +27353,6 @@ async function prompt(args, cwd = process.cwd()) {
|
|
|
27343
27353
|
value: "eslint",
|
|
27344
27354
|
hint: i18n$1.t("prompts.features.eslint.hint")
|
|
27345
27355
|
},
|
|
27346
|
-
...type === "vuetify0" ? [] : [{
|
|
27347
|
-
label: i18n$1.t("prompts.features.vuetify_nuxt_module.label"),
|
|
27348
|
-
value: "vuetify-nuxt-module",
|
|
27349
|
-
hint: i18n$1.t("prompts.features.vuetify_nuxt_module.hint")
|
|
27350
|
-
}],
|
|
27351
27356
|
{
|
|
27352
27357
|
label: i18n$1.t("prompts.features.mcp.label"),
|
|
27353
27358
|
value: "mcp",
|
|
@@ -27362,28 +27367,56 @@ async function prompt(args, cwd = process.cwd()) {
|
|
|
27362
27367
|
value: "i18n"
|
|
27363
27368
|
}
|
|
27364
27369
|
],
|
|
27365
|
-
initialValues: [
|
|
27366
|
-
"eslint",
|
|
27367
|
-
...type === "vuetify0" ? [] : ["vuetify-nuxt-module"],
|
|
27368
|
-
"mcp"
|
|
27369
|
-
],
|
|
27370
|
+
initialValues: ["eslint", "mcp"],
|
|
27370
27371
|
required: false
|
|
27371
27372
|
});
|
|
27372
27373
|
},
|
|
27374
|
+
router: ({ results }) => {
|
|
27375
|
+
if (args.router) return Promise.resolve(args.router);
|
|
27376
|
+
if ((results.platform || args.platform) !== "vue") return Promise.resolve("none");
|
|
27377
|
+
if (!(results.features || args.features || []).includes("router")) return Promise.resolve("none");
|
|
27378
|
+
if (!args.interactive) return Promise.resolve("router");
|
|
27379
|
+
return qt({
|
|
27380
|
+
message: i18n$1.t("prompts.router.select"),
|
|
27381
|
+
initialValue: "router",
|
|
27382
|
+
options: [
|
|
27383
|
+
{
|
|
27384
|
+
label: i18n$1.t("prompts.router.none"),
|
|
27385
|
+
value: "none"
|
|
27386
|
+
},
|
|
27387
|
+
{
|
|
27388
|
+
label: i18n$1.t("prompts.router.standard.label"),
|
|
27389
|
+
value: "router",
|
|
27390
|
+
hint: i18n$1.t("prompts.router.standard.hint")
|
|
27391
|
+
},
|
|
27392
|
+
{
|
|
27393
|
+
label: i18n$1.t("prompts.router.file.label"),
|
|
27394
|
+
value: "file-router",
|
|
27395
|
+
hint: i18n$1.t("prompts.router.file.hint")
|
|
27396
|
+
}
|
|
27397
|
+
]
|
|
27398
|
+
});
|
|
27399
|
+
},
|
|
27373
27400
|
clientHints: ({ results }) => {
|
|
27374
27401
|
if (args.clientHints !== void 0) return Promise.resolve(args.clientHints);
|
|
27375
27402
|
if (!args.interactive) return Promise.resolve(false);
|
|
27376
|
-
|
|
27377
|
-
const features = results.features || args.features || [];
|
|
27378
|
-
if (platform === "nuxt" && features.includes("vuetify-nuxt-module")) return Mt({
|
|
27403
|
+
if ((results.platform || args.platform) === "nuxt") return Mt({
|
|
27379
27404
|
message: i18n$1.t("prompts.client_hints.enable"),
|
|
27380
27405
|
initialValue: false
|
|
27381
27406
|
});
|
|
27382
27407
|
return Promise.resolve(false);
|
|
27383
27408
|
},
|
|
27384
|
-
|
|
27409
|
+
install: () => {
|
|
27410
|
+
if (args.install !== void 0) return Promise.resolve(args.install);
|
|
27411
|
+
if (!args.interactive) return Promise.resolve(false);
|
|
27412
|
+
return Mt({
|
|
27413
|
+
message: i18n$1.t("prompts.install"),
|
|
27414
|
+
initialValue: true
|
|
27415
|
+
});
|
|
27416
|
+
},
|
|
27417
|
+
packageManager: ({ results }) => {
|
|
27385
27418
|
if (args.packageManager) return Promise.resolve(args.packageManager);
|
|
27386
|
-
if (args.install === false) return Promise.resolve("
|
|
27419
|
+
if ((results.install ?? args.install) === false) return Promise.resolve(getUserAgent() ?? "npm");
|
|
27387
27420
|
if (!args.interactive) return Promise.resolve(getUserAgent() ?? "npm");
|
|
27388
27421
|
return qt({
|
|
27389
27422
|
message: i18n$1.t("prompts.package_manager.select"),
|
|
@@ -27408,31 +27441,18 @@ async function prompt(args, cwd = process.cwd()) {
|
|
|
27408
27441
|
{
|
|
27409
27442
|
label: "bun",
|
|
27410
27443
|
value: "bun"
|
|
27411
|
-
},
|
|
27412
|
-
{
|
|
27413
|
-
label: "none",
|
|
27414
|
-
value: "none"
|
|
27415
27444
|
}
|
|
27416
27445
|
]
|
|
27417
27446
|
});
|
|
27418
|
-
},
|
|
27419
|
-
install: ({ results }) => {
|
|
27420
|
-
if (args.install !== void 0) return Promise.resolve(args.install);
|
|
27421
|
-
if (!args.interactive) return Promise.resolve(false);
|
|
27422
|
-
if ((results.packageManager || args.packageManager) === "none") return Promise.resolve(false);
|
|
27423
|
-
return Mt({
|
|
27424
|
-
message: i18n$1.t("prompts.install"),
|
|
27425
|
-
initialValue: true
|
|
27426
|
-
});
|
|
27427
27447
|
}
|
|
27428
27448
|
}, { onCancel: () => {
|
|
27429
27449
|
Pt(i18n$1.t("prompts.cancel"));
|
|
27430
27450
|
process.exit(0);
|
|
27431
27451
|
} });
|
|
27432
27452
|
const features = [
|
|
27433
|
-
...options.features,
|
|
27434
|
-
options.router,
|
|
27435
|
-
options.
|
|
27453
|
+
...(options.features || []).filter((f) => f !== "router"),
|
|
27454
|
+
options.router === "none" ? void 0 : options.router,
|
|
27455
|
+
options.type === "vuetify0" ? options.css === "none" ? "css-none" : options.css : options.css === "none" ? void 0 : options.css
|
|
27436
27456
|
].filter((f) => f && f !== "none");
|
|
27437
27457
|
return {
|
|
27438
27458
|
...options,
|
|
@@ -27655,7 +27675,7 @@ async function downloadTemplate(input, options = {}) {
|
|
|
27655
27675
|
const tarPath = resolve$1$1(resolve$1$1(cacheDirectory(), providerName, template.name), (template.version || template.name) + ".tar.gz");
|
|
27656
27676
|
if (options.preferOffline && existsSync(tarPath)) options.offline = true;
|
|
27657
27677
|
if (!options.offline) {
|
|
27658
|
-
await mkdir(dirname$1(tarPath), { recursive: true });
|
|
27678
|
+
await mkdir(dirname$1$1(tarPath), { recursive: true });
|
|
27659
27679
|
const s = Date.now();
|
|
27660
27680
|
await download(template.tar, tarPath, { headers: {
|
|
27661
27681
|
Authorization: options.auth ? `Bearer ${options.auth}` : void 0,
|
|
@@ -27709,8 +27729,8 @@ async function downloadTemplate(input, options = {}) {
|
|
|
27709
27729
|
const cssNone = {
|
|
27710
27730
|
name: "css-none",
|
|
27711
27731
|
apply: async ({ cwd, isNuxt }) => {
|
|
27712
|
-
const
|
|
27713
|
-
if (existsSync(
|
|
27732
|
+
const unocssConfigs = [join$1(cwd, "unocss.config.ts"), join$1(cwd, "uno.config.ts")];
|
|
27733
|
+
for (const configPath of unocssConfigs) if (existsSync(configPath)) rmSync(configPath);
|
|
27714
27734
|
const tailwindCss = isNuxt ? join$1(cwd, "app/assets/css/tailwind.css") : join$1(cwd, "src/tailwind.css");
|
|
27715
27735
|
if (existsSync(tailwindCss)) rmSync(tailwindCss);
|
|
27716
27736
|
}
|
|
@@ -27729,15 +27749,19 @@ var dependencies = {
|
|
|
27729
27749
|
"vue-router": "^4.6.4",
|
|
27730
27750
|
"vue-i18n": "^11.2.7",
|
|
27731
27751
|
"unplugin-vue-router": "^0.19.1",
|
|
27732
|
-
"vite-plugin-vuetify": "^2.1.
|
|
27752
|
+
"vite-plugin-vuetify": "^2.1.3",
|
|
27733
27753
|
"unocss": "^66.5.12",
|
|
27754
|
+
"@unocss/transformer-directives": "^66.6.0",
|
|
27734
27755
|
"@unocss/nuxt": "^66.5.12",
|
|
27756
|
+
"unocss-preset-vuetify": "^0.2.1",
|
|
27735
27757
|
"tailwindcss": "^4.1.18",
|
|
27758
|
+
"@tailwindcss/postcss": "^4.1.18",
|
|
27736
27759
|
"@tailwindcss/vite": "^4.1.18",
|
|
27737
|
-
"@nuxtjs/tailwindcss": "^7.0.0-beta.1",
|
|
27738
27760
|
"pathe": "^2.0.3",
|
|
27739
27761
|
"@vuetify/loader-shared": "^2.1.1",
|
|
27740
|
-
"@intellectronica/ruler": "^0.3.18"
|
|
27762
|
+
"@intellectronica/ruler": "^0.3.18",
|
|
27763
|
+
"@fontsource/roboto": "^5.2.9",
|
|
27764
|
+
"@fontsource/roboto-mono": "^5.2.8"
|
|
27741
27765
|
};
|
|
27742
27766
|
|
|
27743
27767
|
//#endregion
|
|
@@ -27941,6 +27965,37 @@ const mcp = {
|
|
|
27941
27965
|
}
|
|
27942
27966
|
};
|
|
27943
27967
|
|
|
27968
|
+
//#endregion
|
|
27969
|
+
//#region ../shared/src/features/client-hints.ts
|
|
27970
|
+
const nuxtClientHints = {
|
|
27971
|
+
name: "client-hints",
|
|
27972
|
+
apply: async ({ cwd, isNuxt }) => {
|
|
27973
|
+
if (!isNuxt) return;
|
|
27974
|
+
const configPath = join$1(cwd, "nuxt.config.ts");
|
|
27975
|
+
const mod = await loadFile(configPath);
|
|
27976
|
+
const options = getDefaultExportOptions(mod);
|
|
27977
|
+
if (options) {
|
|
27978
|
+
options.vuetify ??= {};
|
|
27979
|
+
options.vuetify.moduleOptions ??= {};
|
|
27980
|
+
options.vuetify.moduleOptions.ssrClientHints = {
|
|
27981
|
+
reloadOnFirstRequest: false,
|
|
27982
|
+
viewportSize: true,
|
|
27983
|
+
prefersColorScheme: true,
|
|
27984
|
+
prefersReducedMotion: true,
|
|
27985
|
+
prefersColorSchemeOptions: { useBrowserThemeOnly: false }
|
|
27986
|
+
};
|
|
27987
|
+
options.vuetify.vuetifyOptions ??= {};
|
|
27988
|
+
options.vuetify.vuetifyOptions.theme ??= {};
|
|
27989
|
+
options.vuetify.vuetifyOptions.theme.defaultTheme = "dark";
|
|
27990
|
+
options.vuetify.vuetifyOptions.theme.themes = {
|
|
27991
|
+
light: {},
|
|
27992
|
+
dark: {}
|
|
27993
|
+
};
|
|
27994
|
+
}
|
|
27995
|
+
await writeFile(configPath, mod.generate().code);
|
|
27996
|
+
}
|
|
27997
|
+
};
|
|
27998
|
+
|
|
27944
27999
|
//#endregion
|
|
27945
28000
|
//#region ../shared/src/features/pinia.ts
|
|
27946
28001
|
const pinia = {
|
|
@@ -27994,7 +28049,7 @@ export const useAppStore = defineStore('app', {
|
|
|
27994
28049
|
|
|
27995
28050
|
//#endregion
|
|
27996
28051
|
//#region ../shared/package.json
|
|
27997
|
-
var version$1 = "
|
|
28052
|
+
var version$1 = "1.1.4";
|
|
27998
28053
|
|
|
27999
28054
|
//#endregion
|
|
28000
28055
|
//#region ../shared/src/utils/getTemplateSource.ts
|
|
@@ -28134,17 +28189,14 @@ export default router
|
|
|
28134
28189
|
//#region ../shared/src/features/tailwindcss.ts
|
|
28135
28190
|
const tailwindcss = {
|
|
28136
28191
|
name: "tailwindcss",
|
|
28137
|
-
apply: async ({ cwd, pkg, isTypescript, isNuxt }) => {
|
|
28138
|
-
|
|
28139
|
-
|
|
28192
|
+
apply: async ({ cwd, pkg, isTypescript, isNuxt, type }) => {
|
|
28193
|
+
if (type === "vuetify" && !isNuxt) return;
|
|
28194
|
+
const unocssConfigs = [join$1(cwd, "unocss.config.ts"), join$1(cwd, "uno.config.ts")];
|
|
28195
|
+
for (const configPath of unocssConfigs) if (existsSync(configPath)) rmSync(configPath);
|
|
28140
28196
|
if (isNuxt) {
|
|
28141
28197
|
pkg.devDependencies = pkg.devDependencies || {};
|
|
28142
28198
|
pkg.devDependencies["tailwindcss"] = dependencies.tailwindcss;
|
|
28143
|
-
pkg.devDependencies["@
|
|
28144
|
-
const configPath = join$1(cwd, "nuxt.config.ts");
|
|
28145
|
-
const mod = await loadFile(configPath);
|
|
28146
|
-
addNuxtModule(mod, "@nuxtjs/tailwindcss");
|
|
28147
|
-
await writeFile(configPath, mod.generate().code);
|
|
28199
|
+
pkg.devDependencies["@tailwindcss/postcss"] = dependencies["@tailwindcss/postcss"];
|
|
28148
28200
|
} else {
|
|
28149
28201
|
pkg.devDependencies = pkg.devDependencies || {};
|
|
28150
28202
|
pkg.devDependencies["tailwindcss"] = dependencies.tailwindcss;
|
|
@@ -28169,102 +28221,60 @@ const tailwindcss = {
|
|
|
28169
28221
|
|
|
28170
28222
|
//#endregion
|
|
28171
28223
|
//#region ../shared/src/features/unocss.ts
|
|
28172
|
-
|
|
28173
|
-
|
|
28174
|
-
|
|
28175
|
-
|
|
28176
|
-
|
|
28177
|
-
|
|
28178
|
-
|
|
28179
|
-
|
|
28180
|
-
|
|
28181
|
-
|
|
28182
|
-
|
|
28183
|
-
|
|
28184
|
-
|
|
28185
|
-
|
|
28186
|
-
|
|
28187
|
-
|
|
28188
|
-
|
|
28189
|
-
|
|
28190
|
-
|
|
28191
|
-
|
|
28192
|
-
|
|
28193
|
-
|
|
28194
|
-
|
|
28195
|
-
|
|
28196
|
-
|
|
28197
|
-
|
|
28198
|
-
|
|
28199
|
-
|
|
28200
|
-
|
|
28201
|
-
|
|
28202
|
-
|
|
28203
|
-
|
|
28224
|
+
async function applyUnocssBase({ cwd, pkg, isTypescript, isNuxt }, options = {}) {
|
|
28225
|
+
pkg.devDependencies = pkg.devDependencies || {};
|
|
28226
|
+
pkg.devDependencies["unocss"] = dependencies.unocss;
|
|
28227
|
+
pkg.devDependencies["@unocss/transformer-directives"] = dependencies["@unocss/transformer-directives"];
|
|
28228
|
+
if (options.presetVuetify) pkg.devDependencies["unocss-preset-vuetify"] = dependencies["unocss-preset-vuetify"];
|
|
28229
|
+
const tailwindCss = isNuxt ? join$1(cwd, "app/assets/css/tailwind.css") : join$1(cwd, "src/tailwind.css");
|
|
28230
|
+
if (existsSync(tailwindCss)) rmSync(tailwindCss);
|
|
28231
|
+
if (pkg.devDependencies) {
|
|
28232
|
+
delete pkg.devDependencies["tailwindcss"];
|
|
28233
|
+
delete pkg.devDependencies["@tailwindcss/vite"];
|
|
28234
|
+
delete pkg.devDependencies["@tailwindcss/postcss"];
|
|
28235
|
+
}
|
|
28236
|
+
if (isNuxt) {
|
|
28237
|
+
pkg.devDependencies["@unocss/nuxt"] = dependencies["@unocss/nuxt"];
|
|
28238
|
+
const configPath = join$1(cwd, "nuxt.config.ts");
|
|
28239
|
+
const mod = await loadFile(configPath);
|
|
28240
|
+
addNuxtModule(mod, "@unocss/nuxt");
|
|
28241
|
+
await writeFile(configPath, mod.generate().code);
|
|
28242
|
+
return;
|
|
28243
|
+
}
|
|
28244
|
+
const viteConfigPath = join$1(cwd, `vite.config.m${isTypescript ? "ts" : "js"}`);
|
|
28245
|
+
const mod = await loadFile(viteConfigPath);
|
|
28246
|
+
addVitePlugin(mod, {
|
|
28247
|
+
from: "unocss/vite",
|
|
28248
|
+
constructor: "UnoCSS"
|
|
28249
|
+
});
|
|
28250
|
+
await writeFile(viteConfigPath, mod.generate().code);
|
|
28251
|
+
for (const file of ["src/main.ts", "src/main.js"]) {
|
|
28252
|
+
const filePath = join$1(cwd, file);
|
|
28253
|
+
if (existsSync(filePath)) {
|
|
28254
|
+
const content = await readFile(filePath, "utf8");
|
|
28255
|
+
if (!content.includes("virtual:uno.css")) {
|
|
28256
|
+
await writeFile(filePath, content.replace(/\/\/ Styles/g, "// Styles\nimport 'virtual:uno.css'"));
|
|
28257
|
+
break;
|
|
28204
28258
|
}
|
|
28205
28259
|
}
|
|
28206
28260
|
}
|
|
28261
|
+
}
|
|
28262
|
+
const unocss = {
|
|
28263
|
+
name: "unocss",
|
|
28264
|
+
apply: async (ctx) => {
|
|
28265
|
+
await applyUnocssBase(ctx);
|
|
28266
|
+
}
|
|
28207
28267
|
};
|
|
28208
|
-
|
|
28209
|
-
|
|
28210
|
-
|
|
28211
|
-
|
|
28212
|
-
name: "vuetify-nuxt-manual",
|
|
28213
|
-
apply: async ({ cwd, pkg, isNuxt }) => {
|
|
28214
|
-
if (!isNuxt) return;
|
|
28215
|
-
const configPath = join$1(cwd, "nuxt.config.ts");
|
|
28216
|
-
pkg.devDependencies = pkg.devDependencies || {};
|
|
28217
|
-
pkg.devDependencies["vite-plugin-vuetify"] = dependencies["vite-plugin-vuetify"];
|
|
28218
|
-
pkg.devDependencies["@vuetify/loader-shared"] = dependencies["@vuetify/loader-shared"];
|
|
28219
|
-
pkg.devDependencies["pathe"] = dependencies.pathe;
|
|
28220
|
-
const mod = await loadFile(configPath);
|
|
28221
|
-
mod.imports.$prepend({
|
|
28222
|
-
from: "vite-plugin-vuetify",
|
|
28223
|
-
imported: "transformAssetUrls"
|
|
28224
|
-
});
|
|
28225
|
-
const options = getDefaultExportOptions(mod);
|
|
28226
|
-
if (options) {
|
|
28227
|
-
options.build ||= {};
|
|
28228
|
-
options.build.transpile ||= [];
|
|
28229
|
-
if (!options.build.transpile.includes("vuetify")) options.build.transpile.push("vuetify");
|
|
28230
|
-
options.vite ||= {};
|
|
28231
|
-
options.vite.vue ||= {};
|
|
28232
|
-
options.vite.vue.template ||= {};
|
|
28233
|
-
options.vite.vue.template.transformAssetUrls = builders.raw("transformAssetUrls");
|
|
28234
|
-
}
|
|
28235
|
-
await writeFile(configPath, mod.generate().code);
|
|
28268
|
+
const unocssWind4 = {
|
|
28269
|
+
name: "unocss-wind4",
|
|
28270
|
+
apply: async (ctx) => {
|
|
28271
|
+
await applyUnocssBase(ctx);
|
|
28236
28272
|
}
|
|
28237
28273
|
};
|
|
28238
|
-
|
|
28239
|
-
|
|
28240
|
-
|
|
28241
|
-
|
|
28242
|
-
name: "vuetify-nuxt-module",
|
|
28243
|
-
apply: async ({ cwd, pkg, clientHints, isNuxt }) => {
|
|
28244
|
-
if (!isNuxt) return;
|
|
28245
|
-
pkg.dependencies = pkg.dependencies || {};
|
|
28246
|
-
pkg.dependencies["vuetify-nuxt-module"] = dependencies["vuetify-nuxt-module"];
|
|
28247
|
-
const configPath = join$1(cwd, "nuxt.config.ts");
|
|
28248
|
-
const mod = await loadFile(configPath);
|
|
28249
|
-
const manualModulePath = join$1(cwd, "modules/vuetify.ts");
|
|
28250
|
-
if (existsSync(manualModulePath)) unlinkSync(manualModulePath);
|
|
28251
|
-
const options = getDefaultExportOptions(mod);
|
|
28252
|
-
if (options) {
|
|
28253
|
-
options.modules ||= [];
|
|
28254
|
-
options.modules.push("vuetify-nuxt-module");
|
|
28255
|
-
options.vuetify = {
|
|
28256
|
-
moduleOptions: {},
|
|
28257
|
-
vuetifyOptions: {}
|
|
28258
|
-
};
|
|
28259
|
-
if (clientHints) options.vuetify.moduleOptions.ssrClientHints = {
|
|
28260
|
-
reloadOnFirstRequest: false,
|
|
28261
|
-
viewportSize: true,
|
|
28262
|
-
prefersColorScheme: true,
|
|
28263
|
-
prefersReducedMotion: true,
|
|
28264
|
-
prefersColorSchemeOptions: { useBrowserThemeOnly: false }
|
|
28265
|
-
};
|
|
28266
|
-
}
|
|
28267
|
-
await writeFile(configPath, mod.generate().code);
|
|
28274
|
+
const unocssVuetify = {
|
|
28275
|
+
name: "unocss-vuetify",
|
|
28276
|
+
apply: async (ctx) => {
|
|
28277
|
+
await applyUnocssBase(ctx, { presetVuetify: true });
|
|
28268
28278
|
}
|
|
28269
28279
|
};
|
|
28270
28280
|
|
|
@@ -28277,13 +28287,14 @@ const features = {
|
|
|
28277
28287
|
i18n,
|
|
28278
28288
|
eslint,
|
|
28279
28289
|
mcp,
|
|
28280
|
-
"
|
|
28281
|
-
"vuetify-nuxt-manual": vuetifyNuxtManual,
|
|
28290
|
+
"client-hints": nuxtClientHints,
|
|
28282
28291
|
unocss,
|
|
28292
|
+
"unocss-wind4": unocssWind4,
|
|
28293
|
+
"unocss-vuetify": unocssVuetify,
|
|
28283
28294
|
tailwindcss,
|
|
28284
28295
|
"css-none": cssNone
|
|
28285
28296
|
};
|
|
28286
|
-
async function applyFeatures(cwd, featureNames, pkg, isTypescript, isNuxt,
|
|
28297
|
+
async function applyFeatures(cwd, featureNames, pkg, isTypescript, isNuxt, type) {
|
|
28287
28298
|
for (const name of featureNames) {
|
|
28288
28299
|
const feature = features[name];
|
|
28289
28300
|
if (feature) await feature.apply({
|
|
@@ -28291,7 +28302,6 @@ async function applyFeatures(cwd, featureNames, pkg, isTypescript, isNuxt, clien
|
|
|
28291
28302
|
pkg,
|
|
28292
28303
|
isTypescript,
|
|
28293
28304
|
isNuxt,
|
|
28294
|
-
clientHints,
|
|
28295
28305
|
type
|
|
28296
28306
|
});
|
|
28297
28307
|
}
|
|
@@ -28657,25 +28667,93 @@ async function installDependencies(root = process.cwd(), manager = packageManage
|
|
|
28657
28667
|
|
|
28658
28668
|
//#endregion
|
|
28659
28669
|
//#region ../shared/src/functions/scaffold.ts
|
|
28670
|
+
function resolveTemplateName(templates, platform, type, features) {
|
|
28671
|
+
if (type !== "vuetify") return templates[platform][type];
|
|
28672
|
+
if (features.includes("unocss-wind4")) return `${platform}/unocss-wind4`;
|
|
28673
|
+
if (features.includes("unocss-vuetify")) return `${platform}/unocss-vuetify`;
|
|
28674
|
+
if (features.includes("tailwindcss")) return `${platform}/tailwind`;
|
|
28675
|
+
return templates[platform][type];
|
|
28676
|
+
}
|
|
28677
|
+
async function resolveSharedAssetsPath() {
|
|
28678
|
+
const templateName = "shared-assets";
|
|
28679
|
+
const envTemplatesPath = process.env.VUETIFY_CLI_TEMPLATES_PATH;
|
|
28680
|
+
if (envTemplatesPath) {
|
|
28681
|
+
const templatePath = join$1(envTemplatesPath, templateName);
|
|
28682
|
+
if (existsSync(templatePath)) return { path: templatePath };
|
|
28683
|
+
}
|
|
28684
|
+
const tempDir = fs.mkdtempSync(join$1(tmpdir(), "vuetify-cli-assets-"));
|
|
28685
|
+
await downloadTemplate(getTemplateSource(templateName), {
|
|
28686
|
+
dir: tempDir,
|
|
28687
|
+
force: true
|
|
28688
|
+
});
|
|
28689
|
+
return {
|
|
28690
|
+
path: tempDir,
|
|
28691
|
+
cleanup: () => rmSync(tempDir, {
|
|
28692
|
+
recursive: true,
|
|
28693
|
+
force: true
|
|
28694
|
+
})
|
|
28695
|
+
};
|
|
28696
|
+
}
|
|
28697
|
+
function copySharedAsset(sourcePath, targetPath) {
|
|
28698
|
+
if (!existsSync(sourcePath)) return;
|
|
28699
|
+
fs.mkdirSync(dirname$1(targetPath), { recursive: true });
|
|
28700
|
+
fs.copyFileSync(sourcePath, targetPath);
|
|
28701
|
+
}
|
|
28702
|
+
async function applySharedAssets(projectRoot, platform, type) {
|
|
28703
|
+
const needsFavicon = type === "vuetify" && (platform === "vue" || platform === "nuxt");
|
|
28704
|
+
const needsLogo = platform === "vue" || platform === "nuxt";
|
|
28705
|
+
const needsV0Badge = type === "vuetify0";
|
|
28706
|
+
if (!needsFavicon && !needsLogo && !needsV0Badge) return;
|
|
28707
|
+
const assets = await resolveSharedAssetsPath();
|
|
28708
|
+
if (!assets) return;
|
|
28709
|
+
try {
|
|
28710
|
+
if (needsFavicon) copySharedAsset(join$1(assets.path, "favicon.ico"), join$1(projectRoot, "public", "favicon.ico"));
|
|
28711
|
+
if (needsLogo) {
|
|
28712
|
+
const logoRoot = platform === "nuxt" ? join$1(projectRoot, "app", "assets") : join$1(projectRoot, "src", "assets");
|
|
28713
|
+
copySharedAsset(join$1(assets.path, "logo.png"), join$1(logoRoot, "logo.png"));
|
|
28714
|
+
copySharedAsset(join$1(assets.path, "logo.svg"), join$1(logoRoot, "logo.svg"));
|
|
28715
|
+
}
|
|
28716
|
+
if (needsV0Badge) copySharedAsset(join$1(assets.path, "0.png"), join$1(projectRoot, "public", "0.png"));
|
|
28717
|
+
} finally {
|
|
28718
|
+
assets.cleanup?.();
|
|
28719
|
+
}
|
|
28720
|
+
}
|
|
28660
28721
|
async function scaffold(options, callbacks = {}) {
|
|
28661
|
-
const { cwd, name, platform, features, typescript, type,
|
|
28722
|
+
const { cwd, name, platform, features, typescript, type, packageManager, install, force, debug: debugFlag } = options;
|
|
28662
28723
|
const debug = (...msg) => debugFlag && console.log("DEBUG:", ...msg);
|
|
28663
28724
|
const projectRoot = join$1(cwd, name);
|
|
28664
28725
|
debug("projectRoot=", projectRoot);
|
|
28665
|
-
if (force && existsSync(projectRoot))
|
|
28666
|
-
|
|
28667
|
-
|
|
28668
|
-
|
|
28669
|
-
|
|
28726
|
+
if (force && existsSync(projectRoot)) {
|
|
28727
|
+
let retries = 5;
|
|
28728
|
+
while (retries > 0) try {
|
|
28729
|
+
rmSync(projectRoot, {
|
|
28730
|
+
recursive: true,
|
|
28731
|
+
force: true
|
|
28732
|
+
});
|
|
28733
|
+
break;
|
|
28734
|
+
} catch (error) {
|
|
28735
|
+
if ([
|
|
28736
|
+
"ENOTEMPTY",
|
|
28737
|
+
"EPERM",
|
|
28738
|
+
"EBUSY"
|
|
28739
|
+
].includes(error.code)) {
|
|
28740
|
+
retries--;
|
|
28741
|
+
if (retries === 0) throw error;
|
|
28742
|
+
const start = Date.now();
|
|
28743
|
+
while (Date.now() - start < 50);
|
|
28744
|
+
} else throw error;
|
|
28745
|
+
}
|
|
28746
|
+
}
|
|
28747
|
+
const templateName = resolveTemplateName({
|
|
28670
28748
|
vue: {
|
|
28671
28749
|
vuetify0: "vuetify0/base",
|
|
28672
28750
|
vuetify: "vue/base"
|
|
28673
28751
|
},
|
|
28674
28752
|
nuxt: {
|
|
28675
28753
|
vuetify0: "vuetify0/nuxt",
|
|
28676
|
-
vuetify: "
|
|
28754
|
+
vuetify: "nuxt/base"
|
|
28677
28755
|
}
|
|
28678
|
-
}
|
|
28756
|
+
}, platform, type, features);
|
|
28679
28757
|
callbacks.onDownloadStart?.(templateName);
|
|
28680
28758
|
if (process.env.VUETIFY_CLI_TEMPLATES_PATH) {
|
|
28681
28759
|
const templatePath = join$1(process.env.VUETIFY_CLI_TEMPLATES_PATH, templateName);
|
|
@@ -28703,17 +28781,11 @@ async function scaffold(options, callbacks = {}) {
|
|
|
28703
28781
|
}
|
|
28704
28782
|
}
|
|
28705
28783
|
callbacks.onDownloadEnd?.();
|
|
28784
|
+
await applySharedAssets(projectRoot, platform, type);
|
|
28706
28785
|
let pkg;
|
|
28707
28786
|
pkg = await readPackageJSON(join$1(projectRoot, "package.json"));
|
|
28708
|
-
if (vuetifyVersion === "4.x" && pkg.dependencies && pkg.dependencies.vuetify) pkg.dependencies.vuetify = "^4.0.0-beta.1";
|
|
28709
28787
|
callbacks.onConfigStart?.();
|
|
28710
|
-
if (features && features.length > 0) await applyFeatures(projectRoot, features, pkg, !!typescript, platform === "nuxt",
|
|
28711
|
-
if (platform === "nuxt" && type !== "vuetify0" && (!features || !features.includes("vuetify-nuxt-module"))) await vuetifyNuxtManual.apply({
|
|
28712
|
-
cwd: projectRoot,
|
|
28713
|
-
pkg,
|
|
28714
|
-
isTypescript: !!typescript,
|
|
28715
|
-
isNuxt: true
|
|
28716
|
-
});
|
|
28788
|
+
if (features && features.length > 0) await applyFeatures(projectRoot, features, pkg, !!typescript, platform === "nuxt", type);
|
|
28717
28789
|
callbacks.onConfigEnd?.();
|
|
28718
28790
|
const pkgPath = join$1(projectRoot, "package.json");
|
|
28719
28791
|
if (existsSync(pkgPath)) {
|
|
@@ -28779,8 +28851,7 @@ async function createVuetify(options, commandOptions) {
|
|
|
28779
28851
|
platform: rawArgs.platform,
|
|
28780
28852
|
type: rawArgs.type,
|
|
28781
28853
|
css: rawArgs.css,
|
|
28782
|
-
router: rawArgs.router
|
|
28783
|
-
vuetifyVersion: args.vuetifyVersion
|
|
28854
|
+
router: rawArgs.router
|
|
28784
28855
|
}, cwd);
|
|
28785
28856
|
debug("context=", JSON.stringify(context, null, 2));
|
|
28786
28857
|
if (args.interactive && !args.preset) {
|
|
@@ -28828,13 +28899,11 @@ async function createVuetify(options, commandOptions) {
|
|
|
28828
28899
|
name: context.name,
|
|
28829
28900
|
platform: context.platform,
|
|
28830
28901
|
type: context.type,
|
|
28831
|
-
|
|
28832
|
-
features: context.features,
|
|
28902
|
+
features: [...context.features, ...context.clientHints ? ["client-hints"] : []],
|
|
28833
28903
|
typescript: !!context.typescript,
|
|
28834
28904
|
packageManager: context.packageManager,
|
|
28835
28905
|
install: context.install,
|
|
28836
28906
|
force: context.force,
|
|
28837
|
-
clientHints: context.clientHints,
|
|
28838
28907
|
debug: args.debug
|
|
28839
28908
|
}, {
|
|
28840
28909
|
onDownloadStart: (templateName) => {
|
|
@@ -30927,6 +30996,8 @@ function registerProjectArgsCompletion(completion) {
|
|
|
30927
30996
|
const cssOption = completion.options.get("css");
|
|
30928
30997
|
if (cssOption) cssOption.handler = (complete) => {
|
|
30929
30998
|
complete("unocss", "UnoCSS");
|
|
30999
|
+
complete("unocss-wind4", "UnoCSS (Wind4)");
|
|
31000
|
+
complete("unocss-vuetify", "UnoCSS (Vuetify)");
|
|
30930
31001
|
complete("tailwindcss", "Tailwind CSS");
|
|
30931
31002
|
complete("none", "None");
|
|
30932
31003
|
};
|
|
@@ -30938,7 +31009,7 @@ const blue$1 = ansi256(33);
|
|
|
30938
31009
|
|
|
30939
31010
|
//#endregion
|
|
30940
31011
|
//#region package.json
|
|
30941
|
-
var version = "3.1.
|
|
31012
|
+
var version = "3.1.4";
|
|
30942
31013
|
|
|
30943
31014
|
//#endregion
|
|
30944
31015
|
//#region src/commands/presets.ts
|
|
@@ -30949,7 +31020,7 @@ const presets = defineCommand({
|
|
|
30949
31020
|
description: i18n$1.t("commands.presets.description")
|
|
30950
31021
|
},
|
|
30951
31022
|
args: {
|
|
30952
|
-
...projectArgs(),
|
|
31023
|
+
...projectArgs({ exclude: ["type"] }),
|
|
30953
31024
|
list: {
|
|
30954
31025
|
type: "boolean",
|
|
30955
31026
|
description: "List available presets",
|
|
@@ -31026,6 +31097,7 @@ const presets = defineCommand({
|
|
|
31026
31097
|
if (run && typeof run !== "symbol") await createVuetify({
|
|
31027
31098
|
...args,
|
|
31028
31099
|
preset: preset.key || join$1(presetsDir, preset.file),
|
|
31100
|
+
type: "vuetify",
|
|
31029
31101
|
version
|
|
31030
31102
|
}, { intro: false });
|
|
31031
31103
|
else Wt(i18n$1.t("commands.presets.done"));
|
|
@@ -31047,7 +31119,7 @@ const main = defineCommand({
|
|
|
31047
31119
|
description: i18n$1.t("cli.create.description")
|
|
31048
31120
|
},
|
|
31049
31121
|
args: {
|
|
31050
|
-
...projectArgs(),
|
|
31122
|
+
...projectArgs({ exclude: ["type"] }),
|
|
31051
31123
|
cwd: {
|
|
31052
31124
|
type: "string",
|
|
31053
31125
|
description: "The current working directory"
|
|
@@ -31057,6 +31129,7 @@ const main = defineCommand({
|
|
|
31057
31129
|
if (args._[0] === "complete" || args._[0] === "presets") return;
|
|
31058
31130
|
await createVuetify({
|
|
31059
31131
|
...args,
|
|
31132
|
+
type: "vuetify",
|
|
31060
31133
|
version
|
|
31061
31134
|
});
|
|
31062
31135
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-vuetify",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.4",
|
|
4
4
|
"description": "Create a new Vuetify project",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"pathe": "^2.0.3",
|
|
39
39
|
"tsdown": "^0.20.3",
|
|
40
40
|
"vitest": "^4.0.18",
|
|
41
|
-
"@vuetify/cli-shared": "
|
|
41
|
+
"@vuetify/cli-shared": "1.1.4"
|
|
42
42
|
},
|
|
43
43
|
"exports": {
|
|
44
44
|
".": "./dist/index.mjs",
|