create-vue3-enterprise 1.0.29 → 1.0.30
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.js +10 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -165,13 +165,17 @@ async function main() {
|
|
|
165
165
|
]
|
|
166
166
|
},
|
|
167
167
|
{
|
|
168
|
-
type: (prev) =>
|
|
168
|
+
type: (prev) => {
|
|
169
|
+
return ["vue3-ts", "vue3-ts-pinia"].includes(prev.template) ? "confirm" : null;
|
|
170
|
+
},
|
|
169
171
|
name: "needsRouter",
|
|
170
172
|
message: "添加 Vue Router?",
|
|
171
173
|
initial: true
|
|
172
174
|
},
|
|
173
175
|
{
|
|
174
|
-
type: (prev) =>
|
|
176
|
+
type: (prev) => {
|
|
177
|
+
return prev.template === "vue3-ts" ? "confirm" : null;
|
|
178
|
+
},
|
|
175
179
|
name: "needsPinia",
|
|
176
180
|
message: "添加 Pinia (状态管理)?",
|
|
177
181
|
initial: true
|
|
@@ -194,9 +198,11 @@ async function main() {
|
|
|
194
198
|
]
|
|
195
199
|
},
|
|
196
200
|
{
|
|
197
|
-
type:
|
|
201
|
+
type: (prev) => {
|
|
202
|
+
return targetDir && fs.existsSync(targetDir) && fs.readdirSync(targetDir).length > 0 ? "confirm" : null;
|
|
203
|
+
},
|
|
198
204
|
name: "overwrite",
|
|
199
|
-
message:
|
|
205
|
+
message: `目录 "${targetDir}" 已存在且不为空。是否覆盖?`,
|
|
200
206
|
initial: false
|
|
201
207
|
}
|
|
202
208
|
], {
|