create-rspress 1.9.3 → 1.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/dist/index.d.ts +1 -1
- package/dist/index.js +13 -10
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
export {
|
|
2
|
+
export { }
|
package/dist/index.js
CHANGED
|
@@ -8165,17 +8165,20 @@ cli.command("", "Create a new rspress site").action(async () => {
|
|
|
8165
8165
|
];
|
|
8166
8166
|
const defaultProjectName = "rspress-site";
|
|
8167
8167
|
let targetDir = defaultProjectName;
|
|
8168
|
-
const promptProjectDir = async () => await (0, import_prompts2.default)(
|
|
8169
|
-
|
|
8170
|
-
|
|
8171
|
-
|
|
8172
|
-
|
|
8173
|
-
|
|
8174
|
-
|
|
8175
|
-
|
|
8168
|
+
const promptProjectDir = async () => await (0, import_prompts2.default)(
|
|
8169
|
+
[
|
|
8170
|
+
{
|
|
8171
|
+
type: "text",
|
|
8172
|
+
name: "projectDir",
|
|
8173
|
+
initial: defaultProjectName,
|
|
8174
|
+
message: "Project folder",
|
|
8175
|
+
onState: (state) => {
|
|
8176
|
+
targetDir = formatTargetDir(state.value) || defaultProjectName;
|
|
8177
|
+
}
|
|
8176
8178
|
}
|
|
8177
|
-
|
|
8178
|
-
|
|
8179
|
+
],
|
|
8180
|
+
{ onCancel: cancelPrompt }
|
|
8181
|
+
);
|
|
8179
8182
|
await promptProjectDir();
|
|
8180
8183
|
let root = import_path2.default.resolve(process.cwd(), targetDir);
|
|
8181
8184
|
while (import_fs_extra2.default.existsSync(root)) {
|