@aravindc26/velu 0.12.4 → 0.12.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aravindc26/velu",
3
- "version": "0.12.4",
3
+ "version": "0.12.6",
4
4
  "description": "A modern documentation site generator powered by Markdown and JSON configuration",
5
5
  "type": "module",
6
6
  "license": "MIT",
package/src/cli.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { resolve, join, dirname, delimiter } from "node:path";
2
- import { existsSync, mkdirSync, writeFileSync, readdirSync, copyFileSync, rmSync, readFileSync, statSync } from "node:fs";
2
+ import { existsSync, mkdirSync, writeFileSync, readdirSync, copyFileSync, rmSync, readFileSync, statSync, symlinkSync } from "node:fs";
3
3
  import { spawn } from "node:child_process";
4
4
  import { fileURLToPath } from "node:url";
5
5
  import { tmpdir } from "node:os";
@@ -511,6 +511,12 @@ async function previewServer(port: number) {
511
511
  try { rmSync(runtimeDir, { recursive: true, force: true }); } catch {}
512
512
  copyDirMerge(PREVIEW_ENGINE_DIR, runtimeDir);
513
513
 
514
+ // Symlink node_modules so Next.js can resolve dependencies (fumadocs-mdx, etc.)
515
+ const runtimeNodeModules = join(runtimeDir, "node_modules");
516
+ if (!existsSync(runtimeNodeModules)) {
517
+ symlinkSync(NODE_MODULES_PATH, runtimeNodeModules);
518
+ }
519
+
514
520
  console.log(` Starting preview server on port ${port}...`);
515
521
  console.log(` Preview content dir: ${process.env.PREVIEW_CONTENT_DIR || "(default)"}`);
516
522
  console.log(` Workspace dir: ${process.env.WORKSPACE_DIR || "(default)"}`);
@@ -1,4 +1,5 @@
1
1
  import type { ReactNode } from 'react';
2
+ import { RootProvider } from 'fumadocs-ui/provider/next';
2
3
  import './global.css';
3
4
 
4
5
  export const metadata = {
@@ -9,7 +10,9 @@ export default function RootLayout({ children }: { children: ReactNode }) {
9
10
  return (
10
11
  <html lang="en" suppressHydrationWarning>
11
12
  <body className="min-h-screen" suppressHydrationWarning>
12
- {children}
13
+ <RootProvider>
14
+ {children}
15
+ </RootProvider>
13
16
  </body>
14
17
  </html>
15
18
  );