create-vuetify 0.0.6-beta.2 → 0.0.6-beta.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
CHANGED
|
@@ -10216,6 +10216,7 @@ var en_default = {
|
|
|
10216
10216
|
},
|
|
10217
10217
|
messages: {
|
|
10218
10218
|
"eslint": { "deps_already_installed": "All required dependencies are already installed." },
|
|
10219
|
+
"deno": { "version_warning": "\n Deno v%{version} detected. This template requires Deno v2 or higher.\n" },
|
|
10219
10220
|
"all_done": "All done! Happy hacking!",
|
|
10220
10221
|
"project_created": "Project created",
|
|
10221
10222
|
"create": {
|
|
@@ -10395,6 +10396,7 @@ var ru_default = {
|
|
|
10395
10396
|
},
|
|
10396
10397
|
messages: {
|
|
10397
10398
|
"eslint": { "deps_already_installed": "Все необходимые зависимости уже установлены." },
|
|
10399
|
+
"deno": { "version_warning": "\n У вас установлен Deno v%{version}. Этот шаблон требует Deno v2 или выше.\n" },
|
|
10398
10400
|
"all_done": "Готово! Приятной разработки!",
|
|
10399
10401
|
"project_created": "Проект создан",
|
|
10400
10402
|
"create": {
|
|
@@ -28401,7 +28403,7 @@ const banner = createBanner();
|
|
|
28401
28403
|
|
|
28402
28404
|
//#endregion
|
|
28403
28405
|
//#region package.json
|
|
28404
|
-
var version = "0.0.
|
|
28406
|
+
var version = "0.0.6-beta.4";
|
|
28405
28407
|
|
|
28406
28408
|
//#endregion
|
|
28407
28409
|
//#region src/commands/upgrade.ts
|
|
@@ -28619,7 +28621,7 @@ async function installFeature(feature, cwd$1) {
|
|
|
28619
28621
|
} else {
|
|
28620
28622
|
const tmp = mkdtempSync(join(tmpdir(), "vuetify-feature-"));
|
|
28621
28623
|
try {
|
|
28622
|
-
await downloadTemplate(`gh:vuetifyjs/
|
|
28624
|
+
await downloadTemplate(`gh:vuetifyjs/templates/${templateName}`, { dir: tmp });
|
|
28623
28625
|
cpSync(tmp, cwd$1, { recursive: true });
|
|
28624
28626
|
} finally {
|
|
28625
28627
|
rmSync(tmp, {
|
|
@@ -28899,15 +28901,23 @@ async function prompt(args$2, cwd$1 = process.cwd()) {
|
|
|
28899
28901
|
if (args$2.features) return Promise.resolve(args$2.features.filter((f$6) => f$6 !== "router" && f$6 !== "file-router"));
|
|
28900
28902
|
return (results.type || args$2.type) === "vue" ? Lt({
|
|
28901
28903
|
message: i18n.t("prompts.features.select", { hint: dim("↑/↓ to navigate, space to select, a to toggle all, enter to confirm") }),
|
|
28902
|
-
options: [
|
|
28903
|
-
|
|
28904
|
-
|
|
28905
|
-
|
|
28906
|
-
|
|
28907
|
-
|
|
28908
|
-
|
|
28909
|
-
|
|
28910
|
-
|
|
28904
|
+
options: [
|
|
28905
|
+
{
|
|
28906
|
+
label: i18n.t("prompts.features.pinia.label"),
|
|
28907
|
+
value: "pinia",
|
|
28908
|
+
hint: i18n.t("prompts.features.pinia.hint")
|
|
28909
|
+
},
|
|
28910
|
+
{
|
|
28911
|
+
label: i18n.t("prompts.features.eslint.label"),
|
|
28912
|
+
value: "eslint",
|
|
28913
|
+
hint: i18n.t("prompts.features.eslint.hint")
|
|
28914
|
+
},
|
|
28915
|
+
{
|
|
28916
|
+
label: i18n.t("prompts.features.i18n.label"),
|
|
28917
|
+
value: "i18n",
|
|
28918
|
+
hint: i18n.t("prompts.features.i18n.hint")
|
|
28919
|
+
}
|
|
28920
|
+
],
|
|
28911
28921
|
initialValues: ["eslint"],
|
|
28912
28922
|
required: false
|
|
28913
28923
|
}) : Lt({
|
|
@@ -29079,6 +29089,17 @@ async function pnpm(root$3) {
|
|
|
29079
29089
|
if (detect$1) console.warn(detect$1);
|
|
29080
29090
|
}
|
|
29081
29091
|
|
|
29092
|
+
//#endregion
|
|
29093
|
+
//#region src/utils/cli/preinstall/deno.ts
|
|
29094
|
+
async function deno(root$3) {
|
|
29095
|
+
try {
|
|
29096
|
+
const { stdout: stdout$1 } = await x("deno", ["--version"], { nodeOptions: { cwd: root$3 } });
|
|
29097
|
+
const version$1 = stdout$1.split("\n")[0].split(" ")[1];
|
|
29098
|
+
const [major] = version$1.split(".").map(Number);
|
|
29099
|
+
if (major < 2) console.warn(i18n.t("messages.deno.version_warning", { version: version$1 }));
|
|
29100
|
+
} catch {}
|
|
29101
|
+
}
|
|
29102
|
+
|
|
29082
29103
|
//#endregion
|
|
29083
29104
|
//#region src/utils/cli/preinstall/yarn.ts
|
|
29084
29105
|
const templateToAppend = `
|
|
@@ -29100,6 +29121,7 @@ async function yarn(root$3) {
|
|
|
29100
29121
|
const packageManager = getUserAgent() ?? "npm";
|
|
29101
29122
|
async function installDependencies(root$3 = process.cwd(), manager = packageManager) {
|
|
29102
29123
|
if (manager === "yarn") await yarn(root$3);
|
|
29124
|
+
else if (manager === "deno") await deno(root$3);
|
|
29103
29125
|
await installDependencies$1({
|
|
29104
29126
|
packageManager: manager,
|
|
29105
29127
|
cwd: root$3,
|
|
@@ -29200,7 +29222,7 @@ const main = defineCommand({
|
|
|
29200
29222
|
} else debug$1(`templatePath does not exist: ${templatePath}`);
|
|
29201
29223
|
s$9.stop(i18n.t("spinners.template.copied"));
|
|
29202
29224
|
} else {
|
|
29203
|
-
const templateSource = `gh:vuetifyjs/
|
|
29225
|
+
const templateSource = `gh:vuetifyjs/templates/${templateName}`;
|
|
29204
29226
|
try {
|
|
29205
29227
|
await downloadTemplate(templateSource, {
|
|
29206
29228
|
dir: projectRoot,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-vuetify",
|
|
3
|
-
"version": "0.0.6-beta.
|
|
3
|
+
"version": "0.0.6-beta.4",
|
|
4
4
|
"description": "Create a new Vuetify project",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"pathe": "^2.0.3",
|
|
20
20
|
"tsdown": "^0.16.6",
|
|
21
21
|
"vitest": "^4.0.16",
|
|
22
|
-
"@vuetify/cli-shared": "0.0.6-beta.
|
|
22
|
+
"@vuetify/cli-shared": "0.0.6-beta.4"
|
|
23
23
|
},
|
|
24
24
|
"main": "./dist/index.mjs",
|
|
25
25
|
"module": "./dist/index.mjs",
|
package/src/index.ts
CHANGED
|
@@ -117,7 +117,7 @@ export const main = defineCommand({
|
|
|
117
117
|
}
|
|
118
118
|
s.stop(i18n.t('spinners.template.copied'))
|
|
119
119
|
} else {
|
|
120
|
-
const templateSource = `gh:vuetifyjs/
|
|
120
|
+
const templateSource = `gh:vuetifyjs/templates/${templateName}`
|
|
121
121
|
|
|
122
122
|
try {
|
|
123
123
|
await downloadTemplate(templateSource, {
|
package/src/prompts.ts
CHANGED
|
@@ -118,6 +118,7 @@ export async function prompt (args: Partial<ProjectOptions>, cwd = process.cwd()
|
|
|
118
118
|
options: [
|
|
119
119
|
{ label: i18n.t('prompts.features.pinia.label'), value: 'pinia', hint: i18n.t('prompts.features.pinia.hint') },
|
|
120
120
|
{ label: i18n.t('prompts.features.eslint.label'), value: 'eslint', hint: i18n.t('prompts.features.eslint.hint') },
|
|
121
|
+
{ label: i18n.t('prompts.features.i18n.label'), value: 'i18n', hint: i18n.t('prompts.features.i18n.hint') },
|
|
121
122
|
],
|
|
122
123
|
initialValues: ['eslint'],
|
|
123
124
|
required: false,
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { i18n } from '@vuetify/cli-shared/i18n'
|
|
2
|
+
import { x } from 'tinyexec'
|
|
3
|
+
|
|
4
|
+
export default async function deno (root: string) {
|
|
5
|
+
try {
|
|
6
|
+
const { stdout } = await x('deno', ['--version'], { nodeOptions: { cwd: root } })
|
|
7
|
+
const version = stdout.split('\n')[0].split(' ')[1]
|
|
8
|
+
const [major] = version.split('.').map(Number)
|
|
9
|
+
|
|
10
|
+
if (major < 2) {
|
|
11
|
+
console.warn(i18n.t('messages.deno.version_warning', { version }))
|
|
12
|
+
}
|
|
13
|
+
} catch {
|
|
14
|
+
//
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { installDependencies as installDependencies$1 } from 'nypm'
|
|
2
2
|
import { getUserAgent } from 'package-manager-detector'
|
|
3
3
|
import { pnpm } from './cli/postinstall'
|
|
4
|
-
import { yarn } from './cli/preinstall'
|
|
4
|
+
import { deno, yarn } from './cli/preinstall'
|
|
5
5
|
|
|
6
6
|
export const packageManager = getUserAgent() ?? 'npm'
|
|
7
7
|
|
|
8
8
|
export async function installDependencies (root: string = process.cwd(), manager = packageManager) {
|
|
9
9
|
if (manager === 'yarn') {
|
|
10
10
|
await yarn(root)
|
|
11
|
+
} else if (manager === 'deno') {
|
|
12
|
+
await deno(root)
|
|
11
13
|
}
|
|
12
14
|
await installDependencies$1({
|
|
13
15
|
packageManager: manager,
|
|
@@ -14,7 +14,7 @@ export async function installFeature (feature: string, cwd: string) {
|
|
|
14
14
|
} else {
|
|
15
15
|
const tmp = mkdtempSync(join(tmpdir(), 'vuetify-feature-'))
|
|
16
16
|
try {
|
|
17
|
-
await downloadTemplate(`gh:vuetifyjs/
|
|
17
|
+
await downloadTemplate(`gh:vuetifyjs/templates/${templateName}`, {
|
|
18
18
|
dir: tmp,
|
|
19
19
|
})
|
|
20
20
|
cpSync(tmp, cwd, { recursive: true })
|