create-vuetify0 0.1.3 → 1.0.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 +251 -139
- 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";
|
|
@@ -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,22 @@ 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": {
|
|
9952
|
+
"label": "UnoCSS with Wind4 preset",
|
|
9953
|
+
"hint": "soon"
|
|
9954
|
+
},
|
|
9955
|
+
"unocss_vuetify": {
|
|
9956
|
+
"label": "UnoCSS with Vuetify preset",
|
|
9957
|
+
"hint": "soon"
|
|
9958
|
+
},
|
|
9959
|
+
"tailwindcss": {
|
|
9960
|
+
"label": "Tailwind CSS",
|
|
9961
|
+
"hint": "A utility-first CSS framework"
|
|
9962
|
+
},
|
|
9963
|
+
"status": { "not_supported": "CSS framework %{css} is not supported for %{vuetify} yet." },
|
|
9957
9964
|
"none": "None"
|
|
9958
9965
|
},
|
|
9959
9966
|
"typescript": { "use": "Use TypeScript?" },
|
|
@@ -9972,6 +9979,10 @@ var en_default = {
|
|
|
9972
9979
|
},
|
|
9973
9980
|
"features": {
|
|
9974
9981
|
"select": "Select features to install: %{hint}",
|
|
9982
|
+
"router": {
|
|
9983
|
+
"label": "Router",
|
|
9984
|
+
"hint": "Configure Vue Router"
|
|
9985
|
+
},
|
|
9975
9986
|
"pinia": { "label": "Pinia" },
|
|
9976
9987
|
"eslint": {
|
|
9977
9988
|
"label": "ESLint",
|
|
@@ -10052,8 +10063,7 @@ var en_default = {
|
|
|
10052
10063
|
"platform": { "description": "The framework to use" },
|
|
10053
10064
|
"verbose": { "description": "Output verbose logs" },
|
|
10054
10065
|
"version": { "description": "The Vuetify version to check documentation for" },
|
|
10055
|
-
"preset": { "description": "Path to a preset file to load" }
|
|
10056
|
-
"vuetifyVersion": { "description": "Vuetify version" }
|
|
10066
|
+
"preset": { "description": "Path to a preset file to load" }
|
|
10057
10067
|
},
|
|
10058
10068
|
cli: {
|
|
10059
10069
|
"main": { "description": "Unified CLI for Vuetify" },
|
|
@@ -10121,7 +10131,7 @@ var ru_default = {
|
|
|
10121
10131
|
"checking": "Проверка обновлений...",
|
|
10122
10132
|
"intro": "Проверка обновлений...",
|
|
10123
10133
|
"not_installed": "Vuetify не установлен в этом проекте.",
|
|
10124
|
-
"deprecated_v2": "Vuetify 2 устарел. Пожалуйста, рассмотрите возможность обновления до Vuetify
|
|
10134
|
+
"deprecated_v2": "Vuetify 2 устарел. Пожалуйста, рассмотрите возможность обновления до Vuetify 4.",
|
|
10125
10135
|
"outdated_v1": "Vuetify 1 устарел. Пожалуйста, обновитесь.",
|
|
10126
10136
|
"updated": "Обновлен %{pkg}",
|
|
10127
10137
|
"failed": "Не удалось обновить %{pkg}",
|
|
@@ -10191,11 +10201,6 @@ var ru_default = {
|
|
|
10191
10201
|
"hint": "Библиотека headless компонентов"
|
|
10192
10202
|
}
|
|
10193
10203
|
},
|
|
10194
|
-
"vuetify_version": {
|
|
10195
|
-
"select": "Выберите версию Vuetify:",
|
|
10196
|
-
"3_x": "Vuetify 3 (стабильная)",
|
|
10197
|
-
"4_x": "Vuetify 4 (бета)"
|
|
10198
|
-
},
|
|
10199
10204
|
"css_framework": {
|
|
10200
10205
|
"select": "Какой фреймворк CSS вы хотите использовать?",
|
|
10201
10206
|
"none": "Никакой",
|
|
@@ -10203,10 +10208,19 @@ var ru_default = {
|
|
|
10203
10208
|
"label": "UnoCSS",
|
|
10204
10209
|
"hint": "Быстрая и гибкая система стилей"
|
|
10205
10210
|
},
|
|
10211
|
+
"unocss_wind4": {
|
|
10212
|
+
"label": "UnoCSS с пресетом Wind4",
|
|
10213
|
+
"hint": "скоро"
|
|
10214
|
+
},
|
|
10215
|
+
"unocss_vuetify": {
|
|
10216
|
+
"label": "UnoCSS с пресетом Vuetify",
|
|
10217
|
+
"hint": "скоро"
|
|
10218
|
+
},
|
|
10206
10219
|
"tailwindcss": {
|
|
10207
10220
|
"label": "Tailwind CSS",
|
|
10208
10221
|
"hint": "Атомарный CSS-фреймворк"
|
|
10209
|
-
}
|
|
10222
|
+
},
|
|
10223
|
+
"status": { "not_supported": "CSS-фреймворк %{css} пока не поддерживается для %{vuetify}." }
|
|
10210
10224
|
},
|
|
10211
10225
|
"typescript": { "use": "Использовать TypeScript?" },
|
|
10212
10226
|
"router": {
|
|
@@ -10224,6 +10238,10 @@ var ru_default = {
|
|
|
10224
10238
|
},
|
|
10225
10239
|
"features": {
|
|
10226
10240
|
"select": "Выберите функции для установки: %{hint}",
|
|
10241
|
+
"router": {
|
|
10242
|
+
"label": "Роутер",
|
|
10243
|
+
"hint": "Добавить Vue Router"
|
|
10244
|
+
},
|
|
10227
10245
|
"pinia": { "label": "Pinia" },
|
|
10228
10246
|
"eslint": {
|
|
10229
10247
|
"label": "ESLint",
|
|
@@ -10299,8 +10317,7 @@ var ru_default = {
|
|
|
10299
10317
|
"platform": { "description": "Фреймворк для использования" },
|
|
10300
10318
|
"verbose": { "description": "Вывести подробные логи" },
|
|
10301
10319
|
"preset": { "description": "Путь к файлу пресета для загрузки" },
|
|
10302
|
-
"version": { "description": "Версия Vuetify для просмотра документации" }
|
|
10303
|
-
"vuetifyVersion": { "description": "Версия Vuetify" }
|
|
10320
|
+
"version": { "description": "Версия Vuetify для просмотра документации" }
|
|
10304
10321
|
},
|
|
10305
10322
|
cli: {
|
|
10306
10323
|
"main": { "description": "CLI для Vuetify" },
|
|
@@ -10402,10 +10419,6 @@ function projectArgs(options) {
|
|
|
10402
10419
|
preset: {
|
|
10403
10420
|
type: "string",
|
|
10404
10421
|
description: i18n$1.t("args.preset.description")
|
|
10405
|
-
},
|
|
10406
|
-
vuetifyVersion: {
|
|
10407
|
-
type: "string",
|
|
10408
|
-
description: i18n$1.t("args.vuetifyVersion.description")
|
|
10409
10422
|
}
|
|
10410
10423
|
};
|
|
10411
10424
|
if (options?.exclude) for (const key of options.exclude) delete args[key];
|
|
@@ -12389,6 +12402,11 @@ const relative = function(from, to) {
|
|
|
12389
12402
|
}
|
|
12390
12403
|
return [..._from.map(() => ".."), ..._to].join("/");
|
|
12391
12404
|
};
|
|
12405
|
+
const dirname$1 = function(p) {
|
|
12406
|
+
const segments = normalizeWindowsPath(p).replace(/\/$/, "").split("/").slice(0, -1);
|
|
12407
|
+
if (segments.length === 1 && _DRIVE_LETTER_RE.test(segments[0])) segments[0] += "/";
|
|
12408
|
+
return segments.join("/") || (isAbsolute$1(p) ? "/" : ".");
|
|
12409
|
+
};
|
|
12392
12410
|
|
|
12393
12411
|
//#endregion
|
|
12394
12412
|
//#region ../../node_modules/.pnpm/eslint-visitor-keys@4.2.1/node_modules/eslint-visitor-keys/dist/eslint-visitor-keys.cjs
|
|
@@ -27228,35 +27246,31 @@ async function prompt(args, cwd = process.cwd()) {
|
|
|
27228
27246
|
}]
|
|
27229
27247
|
});
|
|
27230
27248
|
},
|
|
27231
|
-
|
|
27232
|
-
|
|
27233
|
-
|
|
27234
|
-
if (
|
|
27235
|
-
|
|
27236
|
-
|
|
27237
|
-
|
|
27249
|
+
css: ({ results }) => {
|
|
27250
|
+
const type = results.type || args.type;
|
|
27251
|
+
const platform = results.platform || args.platform;
|
|
27252
|
+
if (args.css) if (type === "vuetify" && args.css.startsWith("unocss")) R.warn(i18n$1.t("prompts.css_framework.status.not_supported", {
|
|
27253
|
+
css: "UnoCSS",
|
|
27254
|
+
vuetify: "Vuetify"
|
|
27255
|
+
}));
|
|
27256
|
+
else return Promise.resolve(args.css);
|
|
27257
|
+
if (!args.interactive) return Promise.resolve("none");
|
|
27258
|
+
if (type === "vuetify" && platform === "nuxt") return qt({
|
|
27259
|
+
message: i18n$1.t("prompts.css_framework.select"),
|
|
27260
|
+
initialValue: "none",
|
|
27238
27261
|
options: [{
|
|
27239
|
-
label:
|
|
27240
|
-
value: "
|
|
27262
|
+
label: "Tailwind CSS",
|
|
27263
|
+
value: "tailwindcss",
|
|
27264
|
+
hint: i18n$1.t("prompts.css_framework.tailwindcss.hint")
|
|
27241
27265
|
}, {
|
|
27242
|
-
label: i18n$1.t("prompts.
|
|
27243
|
-
value: "
|
|
27266
|
+
label: i18n$1.t("prompts.css_framework.none"),
|
|
27267
|
+
value: "none"
|
|
27244
27268
|
}]
|
|
27245
27269
|
});
|
|
27246
|
-
},
|
|
27247
|
-
cssFramework: ({ results }) => {
|
|
27248
|
-
const type = results.type || args.type;
|
|
27249
|
-
if (type !== "vuetify0") return Promise.resolve("none");
|
|
27250
|
-
if (args.css) {
|
|
27251
|
-
if (args.css.includes("unocss")) return Promise.resolve("unocss");
|
|
27252
|
-
if (args.css.includes("tailwindcss")) return Promise.resolve("tailwindcss");
|
|
27253
|
-
return Promise.resolve("none");
|
|
27254
|
-
}
|
|
27255
|
-
if (!args.interactive) return Promise.resolve("none");
|
|
27256
27270
|
return qt({
|
|
27257
27271
|
message: i18n$1.t("prompts.css_framework.select"),
|
|
27258
27272
|
initialValue: type === "vuetify0" ? "unocss" : "none",
|
|
27259
|
-
options: [
|
|
27273
|
+
options: type === "vuetify0" ? [
|
|
27260
27274
|
{
|
|
27261
27275
|
label: "UnoCSS",
|
|
27262
27276
|
value: "unocss",
|
|
@@ -27271,43 +27285,40 @@ async function prompt(args, cwd = process.cwd()) {
|
|
|
27271
27285
|
label: i18n$1.t("prompts.css_framework.none"),
|
|
27272
27286
|
value: "none"
|
|
27273
27287
|
}
|
|
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: [
|
|
27288
|
+
] : [
|
|
27292
27289
|
{
|
|
27293
|
-
label: i18n$1.t("prompts.
|
|
27290
|
+
label: i18n$1.t("prompts.css_framework.none"),
|
|
27294
27291
|
value: "none"
|
|
27295
27292
|
},
|
|
27296
27293
|
{
|
|
27297
|
-
label:
|
|
27298
|
-
value: "
|
|
27299
|
-
hint: i18n$1.t("prompts.
|
|
27294
|
+
label: "Tailwind CSS",
|
|
27295
|
+
value: "tailwindcss",
|
|
27296
|
+
hint: i18n$1.t("prompts.css_framework.tailwindcss.hint")
|
|
27300
27297
|
},
|
|
27301
27298
|
{
|
|
27302
|
-
label: i18n$1.t("prompts.
|
|
27303
|
-
|
|
27304
|
-
|
|
27299
|
+
label: i18n$1.t("prompts.css_framework.unocss_wind4.label"),
|
|
27300
|
+
disabled: true,
|
|
27301
|
+
value: "unocss-wind4",
|
|
27302
|
+
hint: i18n$1.t("prompts.css_framework.unocss_wind4.hint")
|
|
27303
|
+
},
|
|
27304
|
+
{
|
|
27305
|
+
label: i18n$1.t("prompts.css_framework.unocss_vuetify.label"),
|
|
27306
|
+
disabled: true,
|
|
27307
|
+
value: "unocss-vuetify",
|
|
27308
|
+
hint: i18n$1.t("prompts.css_framework.unocss_vuetify.hint")
|
|
27305
27309
|
}
|
|
27306
27310
|
]
|
|
27307
27311
|
});
|
|
27308
27312
|
},
|
|
27313
|
+
typescript: ({ results }) => {
|
|
27314
|
+
if ((results.platform || args.platform) === "vue" && args.typescript === void 0) return Mt({
|
|
27315
|
+
message: i18n$1.t("prompts.typescript.use"),
|
|
27316
|
+
initialValue: true
|
|
27317
|
+
});
|
|
27318
|
+
return Promise.resolve(args.typescript ?? true);
|
|
27319
|
+
},
|
|
27309
27320
|
features: ({ results }) => {
|
|
27310
|
-
if (args.features) return Promise.resolve(args.features
|
|
27321
|
+
if (args.features) return Promise.resolve(args.features);
|
|
27311
27322
|
if (!args.interactive) return Promise.resolve([]);
|
|
27312
27323
|
const platform = results.platform || args.platform;
|
|
27313
27324
|
const type = results.type || args.type;
|
|
@@ -27319,6 +27330,11 @@ async function prompt(args, cwd = process.cwd()) {
|
|
|
27319
27330
|
value: "eslint",
|
|
27320
27331
|
hint: i18n$1.t("prompts.features.eslint.hint")
|
|
27321
27332
|
},
|
|
27333
|
+
{
|
|
27334
|
+
label: i18n$1.t("prompts.features.router.label"),
|
|
27335
|
+
value: "router",
|
|
27336
|
+
hint: i18n$1.t("prompts.features.router.hint")
|
|
27337
|
+
},
|
|
27322
27338
|
{
|
|
27323
27339
|
label: i18n$1.t("prompts.features.mcp.label"),
|
|
27324
27340
|
value: "mcp",
|
|
@@ -27370,6 +27386,32 @@ async function prompt(args, cwd = process.cwd()) {
|
|
|
27370
27386
|
required: false
|
|
27371
27387
|
});
|
|
27372
27388
|
},
|
|
27389
|
+
router: ({ results }) => {
|
|
27390
|
+
if (args.router) return Promise.resolve(args.router);
|
|
27391
|
+
if ((results.platform || args.platform) !== "vue") return Promise.resolve("none");
|
|
27392
|
+
if (!(results.features || args.features || []).includes("router")) return Promise.resolve("none");
|
|
27393
|
+
if (!args.interactive) return Promise.resolve("router");
|
|
27394
|
+
return qt({
|
|
27395
|
+
message: i18n$1.t("prompts.router.select"),
|
|
27396
|
+
initialValue: "router",
|
|
27397
|
+
options: [
|
|
27398
|
+
{
|
|
27399
|
+
label: i18n$1.t("prompts.router.none"),
|
|
27400
|
+
value: "none"
|
|
27401
|
+
},
|
|
27402
|
+
{
|
|
27403
|
+
label: i18n$1.t("prompts.router.standard.label"),
|
|
27404
|
+
value: "router",
|
|
27405
|
+
hint: i18n$1.t("prompts.router.standard.hint")
|
|
27406
|
+
},
|
|
27407
|
+
{
|
|
27408
|
+
label: i18n$1.t("prompts.router.file.label"),
|
|
27409
|
+
value: "file-router",
|
|
27410
|
+
hint: i18n$1.t("prompts.router.file.hint")
|
|
27411
|
+
}
|
|
27412
|
+
]
|
|
27413
|
+
});
|
|
27414
|
+
},
|
|
27373
27415
|
clientHints: ({ results }) => {
|
|
27374
27416
|
if (args.clientHints !== void 0) return Promise.resolve(args.clientHints);
|
|
27375
27417
|
if (!args.interactive) return Promise.resolve(false);
|
|
@@ -27381,9 +27423,17 @@ async function prompt(args, cwd = process.cwd()) {
|
|
|
27381
27423
|
});
|
|
27382
27424
|
return Promise.resolve(false);
|
|
27383
27425
|
},
|
|
27384
|
-
|
|
27426
|
+
install: () => {
|
|
27427
|
+
if (args.install !== void 0) return Promise.resolve(args.install);
|
|
27428
|
+
if (!args.interactive) return Promise.resolve(false);
|
|
27429
|
+
return Mt({
|
|
27430
|
+
message: i18n$1.t("prompts.install"),
|
|
27431
|
+
initialValue: true
|
|
27432
|
+
});
|
|
27433
|
+
},
|
|
27434
|
+
packageManager: ({ results }) => {
|
|
27385
27435
|
if (args.packageManager) return Promise.resolve(args.packageManager);
|
|
27386
|
-
if (args.install === false) return Promise.resolve("
|
|
27436
|
+
if ((results.install ?? args.install) === false) return Promise.resolve(getUserAgent() ?? "npm");
|
|
27387
27437
|
if (!args.interactive) return Promise.resolve(getUserAgent() ?? "npm");
|
|
27388
27438
|
return qt({
|
|
27389
27439
|
message: i18n$1.t("prompts.package_manager.select"),
|
|
@@ -27408,31 +27458,18 @@ async function prompt(args, cwd = process.cwd()) {
|
|
|
27408
27458
|
{
|
|
27409
27459
|
label: "bun",
|
|
27410
27460
|
value: "bun"
|
|
27411
|
-
},
|
|
27412
|
-
{
|
|
27413
|
-
label: "none",
|
|
27414
|
-
value: "none"
|
|
27415
27461
|
}
|
|
27416
27462
|
]
|
|
27417
27463
|
});
|
|
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
27464
|
}
|
|
27428
27465
|
}, { onCancel: () => {
|
|
27429
27466
|
Pt(i18n$1.t("prompts.cancel"));
|
|
27430
27467
|
process.exit(0);
|
|
27431
27468
|
} });
|
|
27432
27469
|
const features = [
|
|
27433
|
-
...options.features,
|
|
27434
|
-
options.router,
|
|
27435
|
-
options.
|
|
27470
|
+
...(options.features || []).filter((f) => f !== "router"),
|
|
27471
|
+
options.router === "none" ? void 0 : options.router,
|
|
27472
|
+
options.type === "vuetify0" ? options.css === "none" ? "css-none" : options.css : options.css === "none" ? void 0 : options.css
|
|
27436
27473
|
].filter((f) => f && f !== "none");
|
|
27437
27474
|
return {
|
|
27438
27475
|
...options,
|
|
@@ -27655,7 +27692,7 @@ async function downloadTemplate(input, options = {}) {
|
|
|
27655
27692
|
const tarPath = resolve$1$1(resolve$1$1(cacheDirectory(), providerName, template.name), (template.version || template.name) + ".tar.gz");
|
|
27656
27693
|
if (options.preferOffline && existsSync(tarPath)) options.offline = true;
|
|
27657
27694
|
if (!options.offline) {
|
|
27658
|
-
await mkdir(dirname$1(tarPath), { recursive: true });
|
|
27695
|
+
await mkdir(dirname$1$1(tarPath), { recursive: true });
|
|
27659
27696
|
const s = Date.now();
|
|
27660
27697
|
await download(template.tar, tarPath, { headers: {
|
|
27661
27698
|
Authorization: options.auth ? `Bearer ${options.auth}` : void 0,
|
|
@@ -27709,8 +27746,8 @@ async function downloadTemplate(input, options = {}) {
|
|
|
27709
27746
|
const cssNone = {
|
|
27710
27747
|
name: "css-none",
|
|
27711
27748
|
apply: async ({ cwd, isNuxt }) => {
|
|
27712
|
-
const
|
|
27713
|
-
if (existsSync(
|
|
27749
|
+
const unocssConfigs = [join$1(cwd, "unocss.config.ts"), join$1(cwd, "uno.config.ts")];
|
|
27750
|
+
for (const configPath of unocssConfigs) if (existsSync(configPath)) rmSync(configPath);
|
|
27714
27751
|
const tailwindCss = isNuxt ? join$1(cwd, "app/assets/css/tailwind.css") : join$1(cwd, "src/tailwind.css");
|
|
27715
27752
|
if (existsSync(tailwindCss)) rmSync(tailwindCss);
|
|
27716
27753
|
}
|
|
@@ -27729,15 +27766,19 @@ var dependencies = {
|
|
|
27729
27766
|
"vue-router": "^4.6.4",
|
|
27730
27767
|
"vue-i18n": "^11.2.7",
|
|
27731
27768
|
"unplugin-vue-router": "^0.19.1",
|
|
27732
|
-
"vite-plugin-vuetify": "^2.1.
|
|
27769
|
+
"vite-plugin-vuetify": "^2.1.3",
|
|
27733
27770
|
"unocss": "^66.5.12",
|
|
27771
|
+
"@unocss/transformer-directives": "^66.6.0",
|
|
27734
27772
|
"@unocss/nuxt": "^66.5.12",
|
|
27773
|
+
"unocss-preset-vuetify": "^0.1.1",
|
|
27735
27774
|
"tailwindcss": "^4.1.18",
|
|
27736
27775
|
"@tailwindcss/vite": "^4.1.18",
|
|
27737
27776
|
"@nuxtjs/tailwindcss": "^7.0.0-beta.1",
|
|
27738
27777
|
"pathe": "^2.0.3",
|
|
27739
27778
|
"@vuetify/loader-shared": "^2.1.1",
|
|
27740
|
-
"@intellectronica/ruler": "^0.3.18"
|
|
27779
|
+
"@intellectronica/ruler": "^0.3.18",
|
|
27780
|
+
"@fontsource/roboto": "^5.2.9",
|
|
27781
|
+
"@fontsource/roboto-mono": "^5.2.8"
|
|
27741
27782
|
};
|
|
27742
27783
|
|
|
27743
27784
|
//#endregion
|
|
@@ -27994,7 +28035,7 @@ export const useAppStore = defineStore('app', {
|
|
|
27994
28035
|
|
|
27995
28036
|
//#endregion
|
|
27996
28037
|
//#region ../shared/package.json
|
|
27997
|
-
var version$1 = "0.1
|
|
28038
|
+
var version$1 = "1.0.1";
|
|
27998
28039
|
|
|
27999
28040
|
//#endregion
|
|
28000
28041
|
//#region ../shared/src/utils/getTemplateSource.ts
|
|
@@ -28134,9 +28175,10 @@ export default router
|
|
|
28134
28175
|
//#region ../shared/src/features/tailwindcss.ts
|
|
28135
28176
|
const tailwindcss = {
|
|
28136
28177
|
name: "tailwindcss",
|
|
28137
|
-
apply: async ({ cwd, pkg, isTypescript, isNuxt }) => {
|
|
28138
|
-
|
|
28139
|
-
|
|
28178
|
+
apply: async ({ cwd, pkg, isTypescript, isNuxt, type }) => {
|
|
28179
|
+
if (type === "vuetify" && !isNuxt) return;
|
|
28180
|
+
const unocssConfigs = [join$1(cwd, "unocss.config.ts"), join$1(cwd, "uno.config.ts")];
|
|
28181
|
+
for (const configPath of unocssConfigs) if (existsSync(configPath)) rmSync(configPath);
|
|
28140
28182
|
if (isNuxt) {
|
|
28141
28183
|
pkg.devDependencies = pkg.devDependencies || {};
|
|
28142
28184
|
pkg.devDependencies["tailwindcss"] = dependencies.tailwindcss;
|
|
@@ -28169,40 +28211,57 @@ const tailwindcss = {
|
|
|
28169
28211
|
|
|
28170
28212
|
//#endregion
|
|
28171
28213
|
//#region ../shared/src/features/unocss.ts
|
|
28214
|
+
async function applyUnocssBase({ cwd, pkg, isTypescript, isNuxt }, options = {}) {
|
|
28215
|
+
pkg.devDependencies = pkg.devDependencies || {};
|
|
28216
|
+
pkg.devDependencies["unocss"] = dependencies.unocss;
|
|
28217
|
+
pkg.devDependencies["@unocss/transformer-directives"] = dependencies["@unocss/transformer-directives"];
|
|
28218
|
+
if (options.presetVuetify) pkg.devDependencies["unocss-preset-vuetify"] = dependencies["unocss-preset-vuetify"];
|
|
28219
|
+
const tailwindCss = isNuxt ? join$1(cwd, "app/assets/css/tailwind.css") : join$1(cwd, "src/tailwind.css");
|
|
28220
|
+
if (existsSync(tailwindCss)) rmSync(tailwindCss);
|
|
28221
|
+
if (pkg.devDependencies) {
|
|
28222
|
+
delete pkg.devDependencies["tailwindcss"];
|
|
28223
|
+
delete pkg.devDependencies["@tailwindcss/vite"];
|
|
28224
|
+
delete pkg.devDependencies["@nuxtjs/tailwindcss"];
|
|
28225
|
+
}
|
|
28226
|
+
if (isNuxt) {
|
|
28227
|
+
pkg.devDependencies["@unocss/nuxt"] = dependencies["@unocss/nuxt"];
|
|
28228
|
+
const configPath = join$1(cwd, "nuxt.config.ts");
|
|
28229
|
+
const mod = await loadFile(configPath);
|
|
28230
|
+
addNuxtModule(mod, "@unocss/nuxt");
|
|
28231
|
+
await writeFile(configPath, mod.generate().code);
|
|
28232
|
+
return;
|
|
28233
|
+
}
|
|
28234
|
+
const viteConfigPath = join$1(cwd, `vite.config.m${isTypescript ? "ts" : "js"}`);
|
|
28235
|
+
const mod = await loadFile(viteConfigPath);
|
|
28236
|
+
addVitePlugin(mod, {
|
|
28237
|
+
from: "unocss/vite",
|
|
28238
|
+
constructor: "UnoCSS"
|
|
28239
|
+
});
|
|
28240
|
+
await writeFile(viteConfigPath, mod.generate().code);
|
|
28241
|
+
for (const file of ["src/main.ts", "src/main.js"]) {
|
|
28242
|
+
const filePath = join$1(cwd, file);
|
|
28243
|
+
if (existsSync(filePath)) {
|
|
28244
|
+
await writeFile(filePath, (await readFile(filePath, "utf8")).replace(/\/\/ Styles/g, "// Styles\nimport 'virtual:uno.css'"));
|
|
28245
|
+
break;
|
|
28246
|
+
}
|
|
28247
|
+
}
|
|
28248
|
+
}
|
|
28172
28249
|
const unocss = {
|
|
28173
28250
|
name: "unocss",
|
|
28174
|
-
apply: async (
|
|
28175
|
-
|
|
28176
|
-
|
|
28177
|
-
|
|
28178
|
-
|
|
28179
|
-
|
|
28180
|
-
|
|
28181
|
-
|
|
28182
|
-
|
|
28183
|
-
|
|
28184
|
-
|
|
28185
|
-
|
|
28186
|
-
|
|
28187
|
-
|
|
28188
|
-
addNuxtModule(mod, "@unocss/nuxt");
|
|
28189
|
-
await writeFile(configPath, mod.generate().code);
|
|
28190
|
-
} else {
|
|
28191
|
-
const viteConfigPath = join$1(cwd, `vite.config.m${isTypescript ? "ts" : "js"}`);
|
|
28192
|
-
const mod = await loadFile(viteConfigPath);
|
|
28193
|
-
addVitePlugin(mod, {
|
|
28194
|
-
from: "unocss/vite",
|
|
28195
|
-
constructor: "UnoCSS"
|
|
28196
|
-
});
|
|
28197
|
-
await writeFile(viteConfigPath, mod.generate().code);
|
|
28198
|
-
for (const file of ["src/main.ts", "src/main.js"]) {
|
|
28199
|
-
const filePath = join$1(cwd, file);
|
|
28200
|
-
if (existsSync(filePath)) {
|
|
28201
|
-
await writeFile(filePath, (await readFile(filePath, "utf8")).replace(/\/\/ Styles/g, "// Styles\nimport 'virtual:uno.css'"));
|
|
28202
|
-
break;
|
|
28203
|
-
}
|
|
28204
|
-
}
|
|
28205
|
-
}
|
|
28251
|
+
apply: async (ctx) => {
|
|
28252
|
+
await applyUnocssBase(ctx);
|
|
28253
|
+
}
|
|
28254
|
+
};
|
|
28255
|
+
const unocssWind4 = {
|
|
28256
|
+
name: "unocss-wind4",
|
|
28257
|
+
apply: async (ctx) => {
|
|
28258
|
+
await applyUnocssBase(ctx);
|
|
28259
|
+
}
|
|
28260
|
+
};
|
|
28261
|
+
const unocssVuetify = {
|
|
28262
|
+
name: "unocss-vuetify",
|
|
28263
|
+
apply: async (ctx) => {
|
|
28264
|
+
await applyUnocssBase(ctx, { presetVuetify: true });
|
|
28206
28265
|
}
|
|
28207
28266
|
};
|
|
28208
28267
|
|
|
@@ -28280,6 +28339,8 @@ const features = {
|
|
|
28280
28339
|
"vuetify-nuxt-module": vuetifyNuxtModule,
|
|
28281
28340
|
"vuetify-nuxt-manual": vuetifyNuxtManual,
|
|
28282
28341
|
unocss,
|
|
28342
|
+
"unocss-wind4": unocssWind4,
|
|
28343
|
+
"unocss-vuetify": unocssVuetify,
|
|
28283
28344
|
tailwindcss,
|
|
28284
28345
|
"css-none": cssNone
|
|
28285
28346
|
};
|
|
@@ -28657,8 +28718,59 @@ async function installDependencies(root = process.cwd(), manager = packageManage
|
|
|
28657
28718
|
|
|
28658
28719
|
//#endregion
|
|
28659
28720
|
//#region ../shared/src/functions/scaffold.ts
|
|
28721
|
+
function resolveTemplateName(templates, platform, type, features) {
|
|
28722
|
+
if (platform !== "vue" || type !== "vuetify") return templates[platform][type];
|
|
28723
|
+
if (features.includes("unocss-wind4")) return "vue/unocss-wind4";
|
|
28724
|
+
if (features.includes("unocss-vuetify")) return "vue/unocss-vuetify";
|
|
28725
|
+
if (features.includes("tailwindcss")) return "vue/tailwind";
|
|
28726
|
+
return templates[platform][type];
|
|
28727
|
+
}
|
|
28728
|
+
async function resolveSharedAssetsPath() {
|
|
28729
|
+
const templateName = "shared-assets";
|
|
28730
|
+
const envTemplatesPath = process.env.VUETIFY_CLI_TEMPLATES_PATH;
|
|
28731
|
+
if (envTemplatesPath) {
|
|
28732
|
+
const templatePath = join$1(envTemplatesPath, templateName);
|
|
28733
|
+
if (existsSync(templatePath)) return { path: templatePath };
|
|
28734
|
+
}
|
|
28735
|
+
const tempDir = fs.mkdtempSync(join$1(tmpdir(), "vuetify-cli-assets-"));
|
|
28736
|
+
await downloadTemplate(getTemplateSource(templateName), {
|
|
28737
|
+
dir: tempDir,
|
|
28738
|
+
force: true
|
|
28739
|
+
});
|
|
28740
|
+
return {
|
|
28741
|
+
path: tempDir,
|
|
28742
|
+
cleanup: () => rmSync(tempDir, {
|
|
28743
|
+
recursive: true,
|
|
28744
|
+
force: true
|
|
28745
|
+
})
|
|
28746
|
+
};
|
|
28747
|
+
}
|
|
28748
|
+
function copySharedAsset(sourcePath, targetPath) {
|
|
28749
|
+
if (!existsSync(sourcePath)) return;
|
|
28750
|
+
fs.mkdirSync(dirname$1(targetPath), { recursive: true });
|
|
28751
|
+
fs.copyFileSync(sourcePath, targetPath);
|
|
28752
|
+
}
|
|
28753
|
+
async function applySharedAssets(projectRoot, platform, type) {
|
|
28754
|
+
const needsFavicon = type === "vuetify" && (platform === "vue" || platform === "nuxt");
|
|
28755
|
+
const needsLogo = platform === "vue" || platform === "nuxt";
|
|
28756
|
+
const needsV0Badge = type === "vuetify0";
|
|
28757
|
+
if (!needsFavicon && !needsLogo && !needsV0Badge) return;
|
|
28758
|
+
const assets = await resolveSharedAssetsPath();
|
|
28759
|
+
if (!assets) return;
|
|
28760
|
+
try {
|
|
28761
|
+
if (needsFavicon) copySharedAsset(join$1(assets.path, "favicon.ico"), join$1(projectRoot, "public", "favicon.ico"));
|
|
28762
|
+
if (needsLogo) {
|
|
28763
|
+
const logoRoot = platform === "nuxt" ? join$1(projectRoot, "assets") : join$1(projectRoot, "src", "assets");
|
|
28764
|
+
copySharedAsset(join$1(assets.path, "logo.png"), join$1(logoRoot, "logo.png"));
|
|
28765
|
+
copySharedAsset(join$1(assets.path, "logo.svg"), join$1(logoRoot, "logo.svg"));
|
|
28766
|
+
}
|
|
28767
|
+
if (needsV0Badge) copySharedAsset(join$1(assets.path, "0.png"), join$1(projectRoot, "public", "0.png"));
|
|
28768
|
+
} finally {
|
|
28769
|
+
assets.cleanup?.();
|
|
28770
|
+
}
|
|
28771
|
+
}
|
|
28660
28772
|
async function scaffold(options, callbacks = {}) {
|
|
28661
|
-
const { cwd, name, platform, features, typescript, type,
|
|
28773
|
+
const { cwd, name, platform, features, typescript, type, packageManager, install, force, clientHints, debug: debugFlag } = options;
|
|
28662
28774
|
const debug = (...msg) => debugFlag && console.log("DEBUG:", ...msg);
|
|
28663
28775
|
const projectRoot = join$1(cwd, name);
|
|
28664
28776
|
debug("projectRoot=", projectRoot);
|
|
@@ -28666,16 +28778,16 @@ async function scaffold(options, callbacks = {}) {
|
|
|
28666
28778
|
recursive: true,
|
|
28667
28779
|
force: true
|
|
28668
28780
|
});
|
|
28669
|
-
const templateName = {
|
|
28781
|
+
const templateName = resolveTemplateName({
|
|
28670
28782
|
vue: {
|
|
28671
28783
|
vuetify0: "vuetify0/base",
|
|
28672
28784
|
vuetify: "vue/base"
|
|
28673
28785
|
},
|
|
28674
28786
|
nuxt: {
|
|
28675
28787
|
vuetify0: "vuetify0/nuxt",
|
|
28676
|
-
vuetify: "
|
|
28788
|
+
vuetify: "nuxt/base"
|
|
28677
28789
|
}
|
|
28678
|
-
}
|
|
28790
|
+
}, platform, type, features);
|
|
28679
28791
|
callbacks.onDownloadStart?.(templateName);
|
|
28680
28792
|
if (process.env.VUETIFY_CLI_TEMPLATES_PATH) {
|
|
28681
28793
|
const templatePath = join$1(process.env.VUETIFY_CLI_TEMPLATES_PATH, templateName);
|
|
@@ -28703,9 +28815,9 @@ async function scaffold(options, callbacks = {}) {
|
|
|
28703
28815
|
}
|
|
28704
28816
|
}
|
|
28705
28817
|
callbacks.onDownloadEnd?.();
|
|
28818
|
+
await applySharedAssets(projectRoot, platform, type);
|
|
28706
28819
|
let pkg;
|
|
28707
28820
|
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
28821
|
callbacks.onConfigStart?.();
|
|
28710
28822
|
if (features && features.length > 0) await applyFeatures(projectRoot, features, pkg, !!typescript, platform === "nuxt", clientHints, type);
|
|
28711
28823
|
if (platform === "nuxt" && type !== "vuetify0" && (!features || !features.includes("vuetify-nuxt-module"))) await vuetifyNuxtManual.apply({
|
|
@@ -28779,8 +28891,7 @@ async function createVuetify(options, commandOptions) {
|
|
|
28779
28891
|
platform: rawArgs.platform,
|
|
28780
28892
|
type: rawArgs.type,
|
|
28781
28893
|
css: rawArgs.css,
|
|
28782
|
-
router: rawArgs.router
|
|
28783
|
-
vuetifyVersion: args.vuetifyVersion
|
|
28894
|
+
router: rawArgs.router
|
|
28784
28895
|
}, cwd);
|
|
28785
28896
|
debug("context=", JSON.stringify(context, null, 2));
|
|
28786
28897
|
if (args.interactive && !args.preset) {
|
|
@@ -28828,7 +28939,6 @@ async function createVuetify(options, commandOptions) {
|
|
|
28828
28939
|
name: context.name,
|
|
28829
28940
|
platform: context.platform,
|
|
28830
28941
|
type: context.type,
|
|
28831
|
-
vuetifyVersion: context.vuetifyVersion,
|
|
28832
28942
|
features: context.features,
|
|
28833
28943
|
typescript: !!context.typescript,
|
|
28834
28944
|
packageManager: context.packageManager,
|
|
@@ -30923,6 +31033,8 @@ function registerProjectArgsCompletion(completion) {
|
|
|
30923
31033
|
const cssOption = completion.options.get("css");
|
|
30924
31034
|
if (cssOption) cssOption.handler = (complete) => {
|
|
30925
31035
|
complete("unocss", "UnoCSS");
|
|
31036
|
+
complete("unocss-wind4", "UnoCSS (Wind4)");
|
|
31037
|
+
complete("unocss-vuetify", "UnoCSS (Vuetify)");
|
|
30926
31038
|
complete("tailwindcss", "Tailwind CSS");
|
|
30927
31039
|
complete("none", "None");
|
|
30928
31040
|
};
|
|
@@ -30934,7 +31046,7 @@ const blue = ansi256(33);
|
|
|
30934
31046
|
|
|
30935
31047
|
//#endregion
|
|
30936
31048
|
//#region package.json
|
|
30937
|
-
var version = "0.1
|
|
31049
|
+
var version = "1.0.1";
|
|
30938
31050
|
|
|
30939
31051
|
//#endregion
|
|
30940
31052
|
//#region src/commands/upgrade.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-vuetify0",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Create a new Vuetify project",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"nypm": "^0.6.5",
|
|
37
37
|
"pathe": "^2.0.3",
|
|
38
38
|
"tsdown": "^0.20.3",
|
|
39
|
-
"@vuetify/cli-shared": "0.1
|
|
39
|
+
"@vuetify/cli-shared": "1.0.1"
|
|
40
40
|
},
|
|
41
41
|
"exports": {
|
|
42
42
|
".": "./dist/index.mjs",
|