Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions src/page-generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,16 @@ function writeConfigFiles(directory: string, wizardState: WizardState) {
devstart: "next dev -p 5656 & node start.js",
dev: "next dev -p 5656",
build: "next build",
start: "next start",
start: "next start"
},
keywords: wizardState.coreThemes?.split(",").map((kw) => kw.trim()) || [],
dependencies: {
next: "latest",
nextra: "latest",
"nextra-theme-docs": "latest",
react: "^18",
"react-dom": "^18"
},
keywords: wizardState.coreThemes?.split(",").map((kw) => kw.trim()) || []
};

fs.writeFileSync(
Expand Down Expand Up @@ -173,7 +180,7 @@ export function idempotentlySetupNextraDocs(
`${runner.command} ${runner.installPrefix} react react-dom next nextra nextra-theme-docs typescript @types/node`,
{
cwd: directory,
stdio: "inherit",
stdio: "inherit"
}
);
} catch (err) {
Expand Down Expand Up @@ -205,7 +212,7 @@ export async function generatePages(

if (startNextra) {
const devProcess = exec(`${preferredRunner.command} run devstart`, {
cwd: path.join(pagesFolder, ".."),
cwd: path.join(pagesFolder, "..")
// stdio: "ignore",
// detached: true,
});
Expand Down Expand Up @@ -255,7 +262,7 @@ export async function generatePages(
...JSON.parse(
fs.readFileSync(path.join(pagesFolder, "_meta.json"), "utf-8")
),
[pages[0].section.permalink]: "Basics",
[pages[0].section.permalink]: "Basics"
})
);
}
Expand Down