Skip to content

Commit 8338e84

Browse files
fix(cli): ensure apps directory exists in fumadocs and starlight setups
1 parent 70b0860 commit 8338e84

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

apps/cli/src/helpers/addons/fumadocs-setup.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,11 @@ export async function setupFumadocs(config: ProjectConfig) {
6767
const s = spinner();
6868
s.start("Setting up Fumadocs...");
6969

70+
const appsDir = path.join(projectDir, "apps");
71+
await fs.ensureDir(appsDir);
72+
7073
await execa(fumadocsInitCommand, {
71-
cwd: path.join(projectDir, "apps"),
74+
cwd: appsDir,
7275
env: { CI: "true" },
7376
shell: true,
7477
});

apps/cli/src/helpers/addons/starlight-setup.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import path from "node:path";
22
import { spinner } from "@clack/prompts";
33
import consola from "consola";
44
import { execa } from "execa";
5+
import fs from "fs-extra";
56
import pc from "picocolors";
67
import type { ProjectConfig } from "../../types";
78
import { getPackageExecutionCommand } from "../../utils/package-runner";
@@ -32,8 +33,11 @@ export async function setupStarlight(config: ProjectConfig) {
3233
commandWithArgs,
3334
);
3435

36+
const appsDir = path.join(projectDir, "apps");
37+
await fs.ensureDir(appsDir);
38+
3539
await execa(starlightInitCommand, {
36-
cwd: path.join(projectDir, "apps"),
40+
cwd: appsDir,
3741
env: {
3842
CI: "true",
3943
},

0 commit comments

Comments
 (0)