create-vue 3.9.1 → 3.10.0
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/LICENSE +0 -26
- package/README.md +1 -1
- package/locales/en-US.json +3 -0
- package/locales/fr-FR.json +3 -0
- package/locales/tr-TR.json +3 -0
- package/locales/{zh-CN.json → zh-Hans.json} +5 -2
- package/locales/zh-Hant.json +71 -0
- package/outfile.cjs +83 -256
- package/package.json +10 -11
- package/template/base/.vscode/extensions.json +1 -1
- package/template/base/node_modules/.bin/vite +2 -2
- package/template/base/package.json +3 -3
- package/template/config/cypress/node_modules/.bin/cypress +2 -2
- package/template/config/cypress/package.json +1 -1
- package/template/config/cypress-ct/node_modules/.bin/cypress +2 -2
- package/template/config/cypress-ct/package.json +2 -2
- package/template/config/devtools/package.json +5 -0
- package/template/config/devtools/vite.config.js.data.mjs +12 -0
- package/template/config/jsx/node_modules/.bin/vite +2 -2
- package/template/config/jsx/package.json +2 -2
- package/template/config/nightwatch/node_modules/.bin/chromedriver +2 -2
- package/template/config/nightwatch/node_modules/.bin/geckodriver +2 -2
- package/template/config/nightwatch/node_modules/.bin/nightwatch +2 -2
- package/template/config/nightwatch/node_modules/.bin/ts-node +2 -2
- package/template/config/nightwatch/node_modules/.bin/ts-node-cwd +2 -2
- package/template/config/nightwatch/node_modules/.bin/ts-node-esm +2 -2
- package/template/config/nightwatch/node_modules/.bin/ts-node-script +2 -2
- package/template/config/nightwatch/node_modules/.bin/ts-node-transpile-only +2 -2
- package/template/config/nightwatch/node_modules/.bin/ts-script +2 -2
- package/template/config/nightwatch/node_modules/.bin/tsc +4 -4
- package/template/config/nightwatch/node_modules/.bin/tsserver +4 -4
- package/template/config/nightwatch/node_modules/.bin/vite +4 -4
- package/template/config/nightwatch/package.json +6 -7
- package/template/config/nightwatch-ct/package.json +2 -2
- package/template/config/pinia/package.json +1 -1
- package/template/config/playwright/node_modules/.bin/playwright +2 -2
- package/template/config/playwright/package.json +1 -1
- package/template/config/playwright/playwright.config.js +1 -0
- package/template/config/prettier/.vscode/extensions.json +3 -0
- package/template/config/prettier/.vscode/settings.json +4 -0
- package/template/config/router/package.json +2 -2
- package/template/config/typescript/node_modules/.bin/npm-run-all +2 -2
- package/template/config/typescript/node_modules/.bin/npm-run-all2 +2 -2
- package/template/config/typescript/node_modules/.bin/run-p +2 -2
- package/template/config/typescript/node_modules/.bin/run-s +2 -2
- package/template/config/typescript/node_modules/.bin/tsc +2 -2
- package/template/config/typescript/node_modules/.bin/tsserver +2 -2
- package/template/config/typescript/node_modules/.bin/vue-tsc +2 -2
- package/template/config/typescript/package.json +4 -4
- package/template/config/vitest/node_modules/.bin/vitest +2 -2
- package/template/config/vitest/package.json +4 -4
- package/template/eslint/package.json +2 -1
- package/template/tsconfig/base/package.json +2 -2
- package/template/tsconfig/base/tsconfig.app.json +2 -1
- package/template/tsconfig/base/tsconfig.node.json +3 -1
- package/template/tsconfig/cypress-ct/tsconfig.cypress-ct.json +2 -1
- package/template/tsconfig/nightwatch/nightwatch/tsconfig.json +5 -3
- package/template/tsconfig/nightwatch-ct/tsconfig.app.json +2 -1
- package/template/tsconfig/playwright/e2e/tsconfig.json +1 -1
- package/template/tsconfig/vitest/tsconfig.vitest.json +2 -0
package/LICENSE
CHANGED
|
@@ -356,32 +356,6 @@ Repository: git+https://github.com/marvinhagemeister/kolorist.git
|
|
|
356
356
|
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
357
357
|
> SOFTWARE.
|
|
358
358
|
|
|
359
|
-
## minimist
|
|
360
|
-
|
|
361
|
-
License: MIT
|
|
362
|
-
By: James Halliday
|
|
363
|
-
Repository: git://github.com/minimistjs/minimist.git
|
|
364
|
-
|
|
365
|
-
> This software is released under the MIT license:
|
|
366
|
-
>
|
|
367
|
-
> Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
368
|
-
> this software and associated documentation files (the "Software"), to deal in
|
|
369
|
-
> the Software without restriction, including without limitation the rights to
|
|
370
|
-
> use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
371
|
-
> the Software, and to permit persons to whom the Software is furnished to do so,
|
|
372
|
-
> subject to the following conditions:
|
|
373
|
-
>
|
|
374
|
-
> The above copyright notice and this permission notice shall be included in all
|
|
375
|
-
> copies or substantial portions of the Software.
|
|
376
|
-
>
|
|
377
|
-
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
378
|
-
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
379
|
-
> FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
380
|
-
> COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
381
|
-
> IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
382
|
-
> CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
383
|
-
>
|
|
384
|
-
|
|
385
359
|
## prompts
|
|
386
360
|
|
|
387
361
|
License: MIT
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# create-vue <a href="https://npmjs.com/package/create-vue"><img src="https://badgen.net/npm/v/create-vue" alt="npm package"></a> <a href="https://nodejs.org/en/about/releases
|
|
1
|
+
# create-vue <a href="https://npmjs.com/package/create-vue"><img src="https://badgen.net/npm/v/create-vue" alt="npm package"></a> <a href="https://nodejs.org/en/about/previous-releases"><img src="https://img.shields.io/node/v/create-vue" alt="node compatibility"></a>
|
|
2
2
|
|
|
3
3
|
The recommended way to start a Vite-powered Vue project
|
|
4
4
|
|
package/locales/en-US.json
CHANGED
package/locales/fr-FR.json
CHANGED
|
@@ -50,6 +50,9 @@
|
|
|
50
50
|
"needsPrettier": {
|
|
51
51
|
"message": "Ajouter Prettier pour le formatage du code\u00a0?"
|
|
52
52
|
},
|
|
53
|
+
"needsDevTools": {
|
|
54
|
+
"message": "Ajouter l'extension Vue DevTools pour le débogage\u00a0? (expérimental)"
|
|
55
|
+
},
|
|
53
56
|
"errors": {
|
|
54
57
|
"operationCancelled": "Operation annulée"
|
|
55
58
|
},
|
package/locales/tr-TR.json
CHANGED
|
@@ -50,6 +50,9 @@
|
|
|
50
50
|
"needsPrettier": {
|
|
51
51
|
"message": "是否引入 Prettier 用于代码格式化?"
|
|
52
52
|
},
|
|
53
|
+
"needsDevTools": {
|
|
54
|
+
"message": "Add Vue DevTools extension for debugging? (experimental)"
|
|
55
|
+
},
|
|
53
56
|
"errors": {
|
|
54
57
|
"operationCancelled": "操作取消"
|
|
55
58
|
},
|
|
@@ -58,7 +61,7 @@
|
|
|
58
61
|
"inactive": "否"
|
|
59
62
|
},
|
|
60
63
|
"infos": {
|
|
61
|
-
"scaffolding": "
|
|
62
|
-
"done": "
|
|
64
|
+
"scaffolding": "正在初始化项目",
|
|
65
|
+
"done": "项目初始化完成,可执行以下命令:"
|
|
63
66
|
}
|
|
64
67
|
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
{
|
|
2
|
+
"projectName": {
|
|
3
|
+
"message": "請輸入專案名稱:"
|
|
4
|
+
},
|
|
5
|
+
"shouldOverwrite": {
|
|
6
|
+
"dirForPrompts": {
|
|
7
|
+
"current": "當前資料夾",
|
|
8
|
+
"target": "目標資料夾:"
|
|
9
|
+
},
|
|
10
|
+
"message": "非空,是否覆蓋?"
|
|
11
|
+
},
|
|
12
|
+
"packageName": {
|
|
13
|
+
"message": "請輸入套件名稱:",
|
|
14
|
+
"invalidMessage": "無效的 package.json 名稱"
|
|
15
|
+
},
|
|
16
|
+
"needsTypeScript": {
|
|
17
|
+
"message": "是否使用 TypeScript 語法?"
|
|
18
|
+
},
|
|
19
|
+
"needsJsx": {
|
|
20
|
+
"message": "是否啟用 JSX 支援?"
|
|
21
|
+
},
|
|
22
|
+
"needsRouter": {
|
|
23
|
+
"message": "是否引入 Vue Router 進行單頁應用開發?"
|
|
24
|
+
},
|
|
25
|
+
"needsPinia": {
|
|
26
|
+
"message": "是否引入 Pinia 用於狀態管理?"
|
|
27
|
+
},
|
|
28
|
+
"needsVitest": {
|
|
29
|
+
"message": "是否引入 Vitest 用於單元測試"
|
|
30
|
+
},
|
|
31
|
+
"needsE2eTesting": {
|
|
32
|
+
"message": "是否要引入一款端對端(End to End)測試工具?",
|
|
33
|
+
"hint": "- 使用箭頭切換按 Enter 確認。",
|
|
34
|
+
"selectOptions": {
|
|
35
|
+
"negative": {
|
|
36
|
+
"title": "不需要"
|
|
37
|
+
},
|
|
38
|
+
"cypress": {
|
|
39
|
+
"title": "Cypress",
|
|
40
|
+
"desc": "同時支援基於 Cypress Component Testing 的單元測試"
|
|
41
|
+
},
|
|
42
|
+
"nightwatch": {
|
|
43
|
+
"title": "Nightwatch",
|
|
44
|
+
"desc": "同時支援基於 Nightwatch Component Testing 的單元測試"
|
|
45
|
+
},
|
|
46
|
+
"playwright": {
|
|
47
|
+
"title": "Playwright"
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"needsEslint": {
|
|
52
|
+
"message": "是否引入 ESLint 用於程式碼品質檢測?"
|
|
53
|
+
},
|
|
54
|
+
"needsPrettier": {
|
|
55
|
+
"message": "是否引入 Prettier 用於程式碼格式化?"
|
|
56
|
+
},
|
|
57
|
+
"needsDevTools": {
|
|
58
|
+
"message": "Add Vue DevTools extension for debugging? (experimental)"
|
|
59
|
+
},
|
|
60
|
+
"errors": {
|
|
61
|
+
"operationCancelled": "操作取消"
|
|
62
|
+
},
|
|
63
|
+
"defaultToggleOptions": {
|
|
64
|
+
"active": "是",
|
|
65
|
+
"inactive": "否"
|
|
66
|
+
},
|
|
67
|
+
"infos": {
|
|
68
|
+
"scaffolding": "正在建置專案",
|
|
69
|
+
"done": "專案建置完成,可執行以下命令:"
|
|
70
|
+
}
|
|
71
|
+
}
|
package/outfile.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
/*! create-vue v3.
|
|
2
|
+
/*! create-vue v3.10.0 | MIT */
|
|
3
3
|
var __create = Object.create;
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
5
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -30,228 +30,6 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
30
30
|
mod
|
|
31
31
|
));
|
|
32
32
|
|
|
33
|
-
// node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/index.js
|
|
34
|
-
var require_minimist = __commonJS({
|
|
35
|
-
"node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/index.js"(exports, module2) {
|
|
36
|
-
"use strict";
|
|
37
|
-
function hasKey(obj, keys) {
|
|
38
|
-
var o = obj;
|
|
39
|
-
keys.slice(0, -1).forEach(function(key2) {
|
|
40
|
-
o = o[key2] || {};
|
|
41
|
-
});
|
|
42
|
-
var key = keys[keys.length - 1];
|
|
43
|
-
return key in o;
|
|
44
|
-
}
|
|
45
|
-
function isNumber(x) {
|
|
46
|
-
if (typeof x === "number") {
|
|
47
|
-
return true;
|
|
48
|
-
}
|
|
49
|
-
if (/^0x[0-9a-f]+$/i.test(x)) {
|
|
50
|
-
return true;
|
|
51
|
-
}
|
|
52
|
-
return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x);
|
|
53
|
-
}
|
|
54
|
-
function isConstructorOrProto(obj, key) {
|
|
55
|
-
return key === "constructor" && typeof obj[key] === "function" || key === "__proto__";
|
|
56
|
-
}
|
|
57
|
-
module2.exports = function(args, opts) {
|
|
58
|
-
if (!opts) {
|
|
59
|
-
opts = {};
|
|
60
|
-
}
|
|
61
|
-
var flags = {
|
|
62
|
-
bools: {},
|
|
63
|
-
strings: {},
|
|
64
|
-
unknownFn: null
|
|
65
|
-
};
|
|
66
|
-
if (typeof opts.unknown === "function") {
|
|
67
|
-
flags.unknownFn = opts.unknown;
|
|
68
|
-
}
|
|
69
|
-
if (typeof opts.boolean === "boolean" && opts.boolean) {
|
|
70
|
-
flags.allBools = true;
|
|
71
|
-
} else {
|
|
72
|
-
[].concat(opts.boolean).filter(Boolean).forEach(function(key2) {
|
|
73
|
-
flags.bools[key2] = true;
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
var aliases = {};
|
|
77
|
-
function aliasIsBoolean(key2) {
|
|
78
|
-
return aliases[key2].some(function(x) {
|
|
79
|
-
return flags.bools[x];
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
Object.keys(opts.alias || {}).forEach(function(key2) {
|
|
83
|
-
aliases[key2] = [].concat(opts.alias[key2]);
|
|
84
|
-
aliases[key2].forEach(function(x) {
|
|
85
|
-
aliases[x] = [key2].concat(aliases[key2].filter(function(y) {
|
|
86
|
-
return x !== y;
|
|
87
|
-
}));
|
|
88
|
-
});
|
|
89
|
-
});
|
|
90
|
-
[].concat(opts.string).filter(Boolean).forEach(function(key2) {
|
|
91
|
-
flags.strings[key2] = true;
|
|
92
|
-
if (aliases[key2]) {
|
|
93
|
-
[].concat(aliases[key2]).forEach(function(k) {
|
|
94
|
-
flags.strings[k] = true;
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
});
|
|
98
|
-
var defaults = opts.default || {};
|
|
99
|
-
var argv = { _: [] };
|
|
100
|
-
function argDefined(key2, arg2) {
|
|
101
|
-
return flags.allBools && /^--[^=]+$/.test(arg2) || flags.strings[key2] || flags.bools[key2] || aliases[key2];
|
|
102
|
-
}
|
|
103
|
-
function setKey(obj, keys, value2) {
|
|
104
|
-
var o = obj;
|
|
105
|
-
for (var i2 = 0; i2 < keys.length - 1; i2++) {
|
|
106
|
-
var key2 = keys[i2];
|
|
107
|
-
if (isConstructorOrProto(o, key2)) {
|
|
108
|
-
return;
|
|
109
|
-
}
|
|
110
|
-
if (o[key2] === void 0) {
|
|
111
|
-
o[key2] = {};
|
|
112
|
-
}
|
|
113
|
-
if (o[key2] === Object.prototype || o[key2] === Number.prototype || o[key2] === String.prototype) {
|
|
114
|
-
o[key2] = {};
|
|
115
|
-
}
|
|
116
|
-
if (o[key2] === Array.prototype) {
|
|
117
|
-
o[key2] = [];
|
|
118
|
-
}
|
|
119
|
-
o = o[key2];
|
|
120
|
-
}
|
|
121
|
-
var lastKey = keys[keys.length - 1];
|
|
122
|
-
if (isConstructorOrProto(o, lastKey)) {
|
|
123
|
-
return;
|
|
124
|
-
}
|
|
125
|
-
if (o === Object.prototype || o === Number.prototype || o === String.prototype) {
|
|
126
|
-
o = {};
|
|
127
|
-
}
|
|
128
|
-
if (o === Array.prototype) {
|
|
129
|
-
o = [];
|
|
130
|
-
}
|
|
131
|
-
if (o[lastKey] === void 0 || flags.bools[lastKey] || typeof o[lastKey] === "boolean") {
|
|
132
|
-
o[lastKey] = value2;
|
|
133
|
-
} else if (Array.isArray(o[lastKey])) {
|
|
134
|
-
o[lastKey].push(value2);
|
|
135
|
-
} else {
|
|
136
|
-
o[lastKey] = [o[lastKey], value2];
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
function setArg(key2, val, arg2) {
|
|
140
|
-
if (arg2 && flags.unknownFn && !argDefined(key2, arg2)) {
|
|
141
|
-
if (flags.unknownFn(arg2) === false) {
|
|
142
|
-
return;
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
var value2 = !flags.strings[key2] && isNumber(val) ? Number(val) : val;
|
|
146
|
-
setKey(argv, key2.split("."), value2);
|
|
147
|
-
(aliases[key2] || []).forEach(function(x) {
|
|
148
|
-
setKey(argv, x.split("."), value2);
|
|
149
|
-
});
|
|
150
|
-
}
|
|
151
|
-
Object.keys(flags.bools).forEach(function(key2) {
|
|
152
|
-
setArg(key2, defaults[key2] === void 0 ? false : defaults[key2]);
|
|
153
|
-
});
|
|
154
|
-
var notFlags = [];
|
|
155
|
-
if (args.indexOf("--") !== -1) {
|
|
156
|
-
notFlags = args.slice(args.indexOf("--") + 1);
|
|
157
|
-
args = args.slice(0, args.indexOf("--"));
|
|
158
|
-
}
|
|
159
|
-
for (var i = 0; i < args.length; i++) {
|
|
160
|
-
var arg = args[i];
|
|
161
|
-
var key;
|
|
162
|
-
var next;
|
|
163
|
-
if (/^--.+=/.test(arg)) {
|
|
164
|
-
var m = arg.match(/^--([^=]+)=([\s\S]*)$/);
|
|
165
|
-
key = m[1];
|
|
166
|
-
var value = m[2];
|
|
167
|
-
if (flags.bools[key]) {
|
|
168
|
-
value = value !== "false";
|
|
169
|
-
}
|
|
170
|
-
setArg(key, value, arg);
|
|
171
|
-
} else if (/^--no-.+/.test(arg)) {
|
|
172
|
-
key = arg.match(/^--no-(.+)/)[1];
|
|
173
|
-
setArg(key, false, arg);
|
|
174
|
-
} else if (/^--.+/.test(arg)) {
|
|
175
|
-
key = arg.match(/^--(.+)/)[1];
|
|
176
|
-
next = args[i + 1];
|
|
177
|
-
if (next !== void 0 && !/^(-|--)[^-]/.test(next) && !flags.bools[key] && !flags.allBools && (aliases[key] ? !aliasIsBoolean(key) : true)) {
|
|
178
|
-
setArg(key, next, arg);
|
|
179
|
-
i += 1;
|
|
180
|
-
} else if (/^(true|false)$/.test(next)) {
|
|
181
|
-
setArg(key, next === "true", arg);
|
|
182
|
-
i += 1;
|
|
183
|
-
} else {
|
|
184
|
-
setArg(key, flags.strings[key] ? "" : true, arg);
|
|
185
|
-
}
|
|
186
|
-
} else if (/^-[^-]+/.test(arg)) {
|
|
187
|
-
var letters = arg.slice(1, -1).split("");
|
|
188
|
-
var broken = false;
|
|
189
|
-
for (var j = 0; j < letters.length; j++) {
|
|
190
|
-
next = arg.slice(j + 2);
|
|
191
|
-
if (next === "-") {
|
|
192
|
-
setArg(letters[j], next, arg);
|
|
193
|
-
continue;
|
|
194
|
-
}
|
|
195
|
-
if (/[A-Za-z]/.test(letters[j]) && next[0] === "=") {
|
|
196
|
-
setArg(letters[j], next.slice(1), arg);
|
|
197
|
-
broken = true;
|
|
198
|
-
break;
|
|
199
|
-
}
|
|
200
|
-
if (/[A-Za-z]/.test(letters[j]) && /-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) {
|
|
201
|
-
setArg(letters[j], next, arg);
|
|
202
|
-
broken = true;
|
|
203
|
-
break;
|
|
204
|
-
}
|
|
205
|
-
if (letters[j + 1] && letters[j + 1].match(/\W/)) {
|
|
206
|
-
setArg(letters[j], arg.slice(j + 2), arg);
|
|
207
|
-
broken = true;
|
|
208
|
-
break;
|
|
209
|
-
} else {
|
|
210
|
-
setArg(letters[j], flags.strings[letters[j]] ? "" : true, arg);
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
key = arg.slice(-1)[0];
|
|
214
|
-
if (!broken && key !== "-") {
|
|
215
|
-
if (args[i + 1] && !/^(-|--)[^-]/.test(args[i + 1]) && !flags.bools[key] && (aliases[key] ? !aliasIsBoolean(key) : true)) {
|
|
216
|
-
setArg(key, args[i + 1], arg);
|
|
217
|
-
i += 1;
|
|
218
|
-
} else if (args[i + 1] && /^(true|false)$/.test(args[i + 1])) {
|
|
219
|
-
setArg(key, args[i + 1] === "true", arg);
|
|
220
|
-
i += 1;
|
|
221
|
-
} else {
|
|
222
|
-
setArg(key, flags.strings[key] ? "" : true, arg);
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
} else {
|
|
226
|
-
if (!flags.unknownFn || flags.unknownFn(arg) !== false) {
|
|
227
|
-
argv._.push(flags.strings._ || !isNumber(arg) ? arg : Number(arg));
|
|
228
|
-
}
|
|
229
|
-
if (opts.stopEarly) {
|
|
230
|
-
argv._.push.apply(argv._, args.slice(i + 1));
|
|
231
|
-
break;
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
Object.keys(defaults).forEach(function(k) {
|
|
236
|
-
if (!hasKey(argv, k.split("."))) {
|
|
237
|
-
setKey(argv, k.split("."), defaults[k]);
|
|
238
|
-
(aliases[k] || []).forEach(function(x) {
|
|
239
|
-
setKey(argv, x.split("."), defaults[k]);
|
|
240
|
-
});
|
|
241
|
-
}
|
|
242
|
-
});
|
|
243
|
-
if (opts["--"]) {
|
|
244
|
-
argv["--"] = notFlags.slice();
|
|
245
|
-
} else {
|
|
246
|
-
notFlags.forEach(function(k) {
|
|
247
|
-
argv._.push(k);
|
|
248
|
-
});
|
|
249
|
-
}
|
|
250
|
-
return argv;
|
|
251
|
-
};
|
|
252
|
-
}
|
|
253
|
-
});
|
|
254
|
-
|
|
255
33
|
// node_modules/.pnpm/kleur@3.0.3/node_modules/kleur/index.js
|
|
256
34
|
var require_kleur = __commonJS({
|
|
257
35
|
"node_modules/.pnpm/kleur@3.0.3/node_modules/kleur/index.js"(exports, module2) {
|
|
@@ -3953,7 +3731,7 @@ var require_versionMap = __commonJS({
|
|
|
3953
3731
|
// index.ts
|
|
3954
3732
|
var fs5 = __toESM(require("fs"), 1);
|
|
3955
3733
|
var path5 = __toESM(require("path"), 1);
|
|
3956
|
-
var
|
|
3734
|
+
var import_node_util = require("util");
|
|
3957
3735
|
var import_prompts = __toESM(require_lib(), 1);
|
|
3958
3736
|
|
|
3959
3737
|
// node_modules/.pnpm/kolorist@1.8.0/node_modules/kolorist/dist/esm/index.mjs
|
|
@@ -4199,14 +3977,7 @@ var sfcTypeSupportDoc = [
|
|
|
4199
3977
|
"",
|
|
4200
3978
|
"## Type Support for `.vue` Imports in TS",
|
|
4201
3979
|
"",
|
|
4202
|
-
"TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [
|
|
4203
|
-
"",
|
|
4204
|
-
"If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a [Take Over Mode](https://github.com/johnsoncodehk/volar/discussions/471#discussioncomment-1361669) that is more performant. You can enable it by the following steps:",
|
|
4205
|
-
"",
|
|
4206
|
-
"1. Disable the built-in TypeScript Extension",
|
|
4207
|
-
" 1) Run `Extensions: Show Built-in Extensions` from VSCode's command palette",
|
|
4208
|
-
" 2) Find `TypeScript and JavaScript Language Features`, right click and select `Disable (Workspace)`",
|
|
4209
|
-
"2. Reload the VSCode window by running `Developer: Reload Window` from the command palette.",
|
|
3980
|
+
"TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) to make the TypeScript language service aware of `.vue` types.",
|
|
4210
3981
|
""
|
|
4211
3982
|
].join("\n");
|
|
4212
3983
|
function generateReadme({
|
|
@@ -4228,7 +3999,7 @@ This template should help get you started developing with Vue 3 in Vite.
|
|
|
4228
3999
|
|
|
4229
4000
|
## Recommended IDE Setup
|
|
4230
4001
|
|
|
4231
|
-
[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur)
|
|
4002
|
+
[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur).
|
|
4232
4003
|
${needsTypeScript ? sfcTypeSupportDoc : ""}
|
|
4233
4004
|
## Customize configuration
|
|
4234
4005
|
|
|
@@ -4309,7 +4080,7 @@ ${commandFor("test:e2e", "--debug")}
|
|
|
4309
4080
|
\`\`\`
|
|
4310
4081
|
`;
|
|
4311
4082
|
}
|
|
4312
|
-
if (
|
|
4083
|
+
if (needsNightwatchCT) {
|
|
4313
4084
|
npmScriptsDescriptions += `
|
|
4314
4085
|
### Run Headed Component Tests with [Nightwatch Component Testing](https://nightwatchjs.org/guide/component-testing/introduction.html)
|
|
4315
4086
|
|
|
@@ -4357,12 +4128,34 @@ ${commandFor("lint")}
|
|
|
4357
4128
|
// utils/getLanguage.ts
|
|
4358
4129
|
var fs3 = __toESM(require("fs"), 1);
|
|
4359
4130
|
var path3 = __toESM(require("path"), 1);
|
|
4131
|
+
function linkLocale(locale) {
|
|
4132
|
+
let linkedLocale;
|
|
4133
|
+
try {
|
|
4134
|
+
linkedLocale = Intl.getCanonicalLocales(locale)[0];
|
|
4135
|
+
} catch (error) {
|
|
4136
|
+
console.log(`${error.toString()}
|
|
4137
|
+
`);
|
|
4138
|
+
}
|
|
4139
|
+
switch (linkedLocale) {
|
|
4140
|
+
case "zh-TW":
|
|
4141
|
+
case "zh-HK":
|
|
4142
|
+
case "zh-MO":
|
|
4143
|
+
linkedLocale = "zh-Hant";
|
|
4144
|
+
break;
|
|
4145
|
+
case "zh-CN":
|
|
4146
|
+
case "zh-SG":
|
|
4147
|
+
linkedLocale = "zh-Hans";
|
|
4148
|
+
break;
|
|
4149
|
+
default:
|
|
4150
|
+
linkedLocale = locale;
|
|
4151
|
+
}
|
|
4152
|
+
return linkedLocale;
|
|
4153
|
+
}
|
|
4360
4154
|
function getLocale() {
|
|
4361
4155
|
const shellLocale = process.env.LC_ALL || // POSIX locale environment variables
|
|
4362
4156
|
process.env.LC_MESSAGES || process.env.LANG || Intl.DateTimeFormat().resolvedOptions().locale || // Built-in ECMA-402 support
|
|
4363
4157
|
"en-US";
|
|
4364
|
-
|
|
4365
|
-
return locale;
|
|
4158
|
+
return linkLocale(shellLocale.split(".")[0].replace("_", "-"));
|
|
4366
4159
|
}
|
|
4367
4160
|
function getLanguage() {
|
|
4368
4161
|
const locale = getLocale();
|
|
@@ -4572,13 +4365,14 @@ function createConfig({
|
|
|
4572
4365
|
// template/eslint/package.json
|
|
4573
4366
|
var package_default = {
|
|
4574
4367
|
devDependencies: {
|
|
4575
|
-
"eslint-plugin-cypress": "^2.15.1"
|
|
4368
|
+
"eslint-plugin-cypress": "^2.15.1",
|
|
4369
|
+
"eslint-plugin-playwright": "^1.5.2"
|
|
4576
4370
|
}
|
|
4577
4371
|
};
|
|
4578
4372
|
|
|
4579
4373
|
// utils/renderEslint.ts
|
|
4580
4374
|
var eslintDeps = package_default.devDependencies;
|
|
4581
|
-
function renderEslint(rootDir, { needsTypeScript, needsCypress, needsCypressCT, needsPrettier }) {
|
|
4375
|
+
function renderEslint(rootDir, { needsTypeScript, needsCypress, needsCypressCT, needsPrettier, needsPlaywright }) {
|
|
4582
4376
|
const additionalConfig = {};
|
|
4583
4377
|
const additionalDependencies = {};
|
|
4584
4378
|
if (needsCypress) {
|
|
@@ -4594,6 +4388,15 @@ function renderEslint(rootDir, { needsTypeScript, needsCypress, needsCypressCT,
|
|
|
4594
4388
|
];
|
|
4595
4389
|
additionalDependencies["eslint-plugin-cypress"] = eslintDeps["eslint-plugin-cypress"];
|
|
4596
4390
|
}
|
|
4391
|
+
if (needsPlaywright) {
|
|
4392
|
+
additionalConfig.overrides = [
|
|
4393
|
+
{
|
|
4394
|
+
files: ["e2e/**/*.{test,spec}.{js,ts,jsx,tsx}"],
|
|
4395
|
+
extends: ["plugin:playwright/recommended"]
|
|
4396
|
+
}
|
|
4397
|
+
];
|
|
4398
|
+
additionalDependencies["eslint-plugin-playwright"] = eslintDeps["eslint-plugin-playwright"];
|
|
4399
|
+
}
|
|
4597
4400
|
const { pkg, files } = createConfig({
|
|
4598
4401
|
vueVersion: "3.x",
|
|
4599
4402
|
// we currently don't support other style guides
|
|
@@ -4621,9 +4424,6 @@ function renderEslint(rootDir, { needsTypeScript, needsCypress, needsCypressCT,
|
|
|
4621
4424
|
const extensionsJsonPath = path4.resolve(rootDir, ".vscode/extensions.json");
|
|
4622
4425
|
const existingExtensions = JSON.parse(fs4.readFileSync(extensionsJsonPath, "utf8"));
|
|
4623
4426
|
existingExtensions.recommendations.push("dbaeumer.vscode-eslint");
|
|
4624
|
-
if (needsPrettier) {
|
|
4625
|
-
existingExtensions.recommendations.push("esbenp.prettier-vscode");
|
|
4626
|
-
}
|
|
4627
4427
|
fs4.writeFileSync(extensionsJsonPath, JSON.stringify(existingExtensions, null, 2) + "\n", "utf-8");
|
|
4628
4428
|
}
|
|
4629
4429
|
|
|
@@ -4664,18 +4464,24 @@ async function init() {
|
|
|
4664
4464
|
);
|
|
4665
4465
|
console.log();
|
|
4666
4466
|
const cwd = process.cwd();
|
|
4667
|
-
const
|
|
4668
|
-
|
|
4669
|
-
|
|
4670
|
-
|
|
4671
|
-
|
|
4672
|
-
},
|
|
4673
|
-
|
|
4674
|
-
|
|
4675
|
-
|
|
4467
|
+
const args = process.argv.slice(2);
|
|
4468
|
+
const options2 = {
|
|
4469
|
+
typescript: { type: "boolean" },
|
|
4470
|
+
ts: { type: "boolean" },
|
|
4471
|
+
"with-tests": { type: "boolean" },
|
|
4472
|
+
tests: { type: "boolean" },
|
|
4473
|
+
"vue-router": { type: "boolean" },
|
|
4474
|
+
router: { type: "boolean" },
|
|
4475
|
+
"vue-devtools": { type: "boolean" },
|
|
4476
|
+
devtools: { type: "boolean" }
|
|
4477
|
+
};
|
|
4478
|
+
const { values: argv } = (0, import_node_util.parseArgs)({
|
|
4479
|
+
args,
|
|
4480
|
+
options: options2,
|
|
4481
|
+
strict: false
|
|
4676
4482
|
});
|
|
4677
|
-
const isFeatureFlagsUsed = typeof (argv.default ?? argv.ts ?? argv.jsx ?? argv.router ?? argv.pinia ?? argv.tests ?? argv.vitest ?? argv.cypress ?? argv.nightwatch ?? argv.playwright ?? argv.eslint) === "boolean";
|
|
4678
|
-
let targetDir =
|
|
4483
|
+
const isFeatureFlagsUsed = typeof (argv.default ?? (argv.ts || argv.typescript) ?? argv.jsx ?? (argv.router || argv["vue-router"]) ?? argv.pinia ?? (argv.tests || argv["with-tests"]) ?? argv.vitest ?? argv.cypress ?? argv.nightwatch ?? argv.playwright ?? argv.eslint ?? (argv.devtools || argv["vue-devtools"])) === "boolean";
|
|
4484
|
+
let targetDir = args[0];
|
|
4679
4485
|
const defaultProjectName = !targetDir ? "vue-project" : targetDir;
|
|
4680
4486
|
const forceOverwrite = argv.force;
|
|
4681
4487
|
const language = getLanguage();
|
|
@@ -4804,6 +4610,14 @@ async function init() {
|
|
|
4804
4610
|
initial: false,
|
|
4805
4611
|
active: language.defaultToggleOptions.active,
|
|
4806
4612
|
inactive: language.defaultToggleOptions.inactive
|
|
4613
|
+
},
|
|
4614
|
+
{
|
|
4615
|
+
name: "needsDevTools",
|
|
4616
|
+
type: () => isFeatureFlagsUsed ? null : "toggle",
|
|
4617
|
+
message: language.needsDevTools.message,
|
|
4618
|
+
initial: false,
|
|
4619
|
+
active: language.defaultToggleOptions.active,
|
|
4620
|
+
inactive: language.defaultToggleOptions.inactive
|
|
4807
4621
|
}
|
|
4808
4622
|
],
|
|
4809
4623
|
{
|
|
@@ -4821,12 +4635,13 @@ async function init() {
|
|
|
4821
4635
|
packageName = projectName ?? defaultProjectName,
|
|
4822
4636
|
shouldOverwrite = argv.force,
|
|
4823
4637
|
needsJsx = argv.jsx,
|
|
4824
|
-
needsTypeScript = argv.typescript,
|
|
4825
|
-
needsRouter = argv.router,
|
|
4638
|
+
needsTypeScript = argv.ts || argv.typescript,
|
|
4639
|
+
needsRouter = argv.router || argv["vue-router"],
|
|
4826
4640
|
needsPinia = argv.pinia,
|
|
4827
4641
|
needsVitest = argv.vitest || argv.tests,
|
|
4828
4642
|
needsEslint = argv.eslint || argv["eslint-with-prettier"],
|
|
4829
|
-
needsPrettier = argv["eslint-with-prettier"]
|
|
4643
|
+
needsPrettier = argv["eslint-with-prettier"],
|
|
4644
|
+
needsDevTools = argv.devtools || argv["vue-devtools"]
|
|
4830
4645
|
} = result;
|
|
4831
4646
|
const { needsE2eTesting } = result;
|
|
4832
4647
|
const needsCypress = argv.cypress || argv.tests || needsE2eTesting === "cypress";
|
|
@@ -4931,7 +4746,19 @@ ${language.infos.scaffolding} ${root}...`);
|
|
|
4931
4746
|
);
|
|
4932
4747
|
}
|
|
4933
4748
|
if (needsEslint) {
|
|
4934
|
-
renderEslint(root, {
|
|
4749
|
+
renderEslint(root, {
|
|
4750
|
+
needsTypeScript,
|
|
4751
|
+
needsCypress,
|
|
4752
|
+
needsCypressCT,
|
|
4753
|
+
needsPrettier,
|
|
4754
|
+
needsPlaywright
|
|
4755
|
+
});
|
|
4756
|
+
}
|
|
4757
|
+
if (needsPrettier) {
|
|
4758
|
+
render("config/prettier");
|
|
4759
|
+
}
|
|
4760
|
+
if (needsDevTools) {
|
|
4761
|
+
render("config/devtools");
|
|
4935
4762
|
}
|
|
4936
4763
|
const codeTemplate = (needsTypeScript ? "typescript-" : "") + (needsRouter ? "router" : "default");
|
|
4937
4764
|
render(`code/${codeTemplate}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-vue",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.10.0",
|
|
4
4
|
"description": "An easy way to start a Vue project",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -26,23 +26,22 @@
|
|
|
26
26
|
},
|
|
27
27
|
"homepage": "https://github.com/vuejs/create-vue#readme",
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@tsconfig/
|
|
30
|
-
"@types/eslint": "^8.
|
|
31
|
-
"@types/node": "^
|
|
29
|
+
"@tsconfig/node20": "^20.1.2",
|
|
30
|
+
"@types/eslint": "^8.56.5",
|
|
31
|
+
"@types/node": "^20.11.25",
|
|
32
32
|
"@types/prompts": "^2.4.9",
|
|
33
33
|
"@vue/create-eslint-config": "^0.3.2",
|
|
34
|
-
"@vue/tsconfig": "^0.5.
|
|
34
|
+
"@vue/tsconfig": "^0.5.1",
|
|
35
35
|
"ejs": "^3.1.9",
|
|
36
36
|
"esbuild": "^0.18.20",
|
|
37
37
|
"esbuild-plugin-license": "^1.2.2",
|
|
38
|
-
"husky": "^
|
|
38
|
+
"husky": "^9.0.11",
|
|
39
39
|
"kolorist": "^1.8.0",
|
|
40
|
-
"lint-staged": "^15.2.
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"prettier": "^3.1.1",
|
|
40
|
+
"lint-staged": "^15.2.2",
|
|
41
|
+
"npm-run-all2": "^6.1.2",
|
|
42
|
+
"prettier": "^3.2.5",
|
|
44
43
|
"prompts": "^2.4.2",
|
|
45
|
-
"vitest": "^1.
|
|
44
|
+
"vitest": "^1.3.1",
|
|
46
45
|
"zx": "^7.2.3"
|
|
47
46
|
},
|
|
48
47
|
"lint-staged": {
|
|
@@ -6,9 +6,9 @@ case `uname` in
|
|
|
6
6
|
esac
|
|
7
7
|
|
|
8
8
|
if [ -z "$NODE_PATH" ]; then
|
|
9
|
-
export NODE_PATH="/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/vite@5.
|
|
9
|
+
export NODE_PATH="/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/vite@5.1.5_@types+node@20.11.25/node_modules/vite/bin/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/vite@5.1.5_@types+node@20.11.25/node_modules/vite/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/vite@5.1.5_@types+node@20.11.25/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/node_modules"
|
|
10
10
|
else
|
|
11
|
-
export NODE_PATH="/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/vite@5.
|
|
11
|
+
export NODE_PATH="/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/vite@5.1.5_@types+node@20.11.25/node_modules/vite/bin/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/vite@5.1.5_@types+node@20.11.25/node_modules/vite/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/vite@5.1.5_@types+node@20.11.25/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
12
12
|
fi
|
|
13
13
|
if [ -x "$basedir/node" ]; then
|
|
14
14
|
exec "$basedir/node" "$basedir/../vite/bin/vite.js" "$@"
|