create-fumadocs-app 15.2.4 → 15.2.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.
@@ -60,7 +60,7 @@ function tryGitInit(root) {
60
60
  }
61
61
 
62
62
  // src/versions.js
63
- var versions = { "fumadocs-core": "15.2.4", "fumadocs-ui": "15.2.4", "fumadocs-mdx": "11.5.8", "@fumadocs/mdx-remote": "1.3.0", "@fumadocs/content-collections": "1.1.8" };
63
+ var versions = { "fumadocs-core": "15.2.6", "fumadocs-ui": "15.2.6", "fumadocs-mdx": "11.5.8", "@fumadocs/mdx-remote": "1.3.0", "@fumadocs/content-collections": "1.1.8" };
64
64
 
65
65
  // ../create-app-versions/package.json
66
66
  var package_default = {
@@ -73,13 +73,13 @@ var package_default = {
73
73
  "@content-collections/core": "^0.8.2",
74
74
  "@content-collections/mdx": "^0.2.2",
75
75
  "@content-collections/next": "^0.2.6",
76
- "@react-router/dev": "^7.4.1",
77
- "@react-router/node": "^7.4.1",
78
- "@react-router/serve": "^7.4.1",
79
- "@tailwindcss/postcss": "^4.1.1",
80
- "@tailwindcss/vite": "^4.1.1",
81
- "@tanstack/react-router": "^1.114.34",
82
- "@tanstack/react-start": "^1.114.34",
76
+ "@react-router/dev": "^7.5.0",
77
+ "@react-router/node": "^7.5.0",
78
+ "@react-router/serve": "^7.5.0",
79
+ "@tailwindcss/postcss": "^4.1.3",
80
+ "@tailwindcss/vite": "^4.1.3",
81
+ "@tanstack/react-router": "^1.115.2",
82
+ "@tanstack/react-start": "^1.115.2",
83
83
  "@types/mdx": "^2.0.13",
84
84
  "@types/node": "22.14.0",
85
85
  "@types/react": "^19.1.0",
@@ -92,13 +92,13 @@ var package_default = {
92
92
  postcss: "^8.5.3",
93
93
  react: "^19.1.0",
94
94
  "react-dom": "^19.1.0",
95
- "react-router": "^7.4.1",
96
- "react-router-devtools": "^1.1.8",
95
+ "react-router": "^7.5.0",
96
+ "react-router-devtools": "^1.1.10",
97
97
  shiki: "^3.2.1",
98
- tailwindcss: "^4.1.1",
99
- typescript: "^5.8.2",
98
+ tailwindcss: "^4.1.3",
99
+ typescript: "^5.8.3",
100
100
  vinxi: "^0.5.3",
101
- vite: "^6.2.4",
101
+ vite: "^6.2.5",
102
102
  "vite-tsconfig-paths": "^5.1.4"
103
103
  }
104
104
  };
@@ -154,16 +154,16 @@ async function create(options) {
154
154
  const projectName = path.basename(options.outputDir);
155
155
  const dest = path.resolve(cwd, options.outputDir);
156
156
  const isNext = options.template.startsWith("+next");
157
+ function isRelative(dir, file) {
158
+ return !path.relative(path.join(dest, dir), file).startsWith(`..${path.sep}`);
159
+ }
157
160
  function defaultRename(file) {
158
161
  file = file.replace("example.gitignore", ".gitignore");
159
162
  if (!options.useSrcDir || !isNext) {
160
163
  return file;
161
164
  }
162
- for (const dir of ["app", "lib"]) {
163
- const relative = path.relative(path.join(dest, dir), file);
164
- if (!relative.startsWith(`..${path.sep}`)) {
165
- return path.join(dest, "src", dir, relative);
166
- }
165
+ if (path.basename(file) === "mdx-components.tsx" || isRelative("app", file) || isRelative("lib", file)) {
166
+ return path.join(dest, "src", path.relative(dest, file));
167
167
  }
168
168
  return file;
169
169
  }
@@ -331,7 +331,7 @@ function createPackageJson(projectName, options) {
331
331
  private: true,
332
332
  scripts: {
333
333
  build: "next build",
334
- dev: "next dev",
334
+ dev: "next dev --turbo",
335
335
  start: "next start",
336
336
  ...options.template === "+next+fuma-docs-mdx" ? {
337
337
  postinstall: "fumadocs-mdx"
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  create
3
- } from "./chunk-3SSTN7F3.js";
3
+ } from "./chunk-DE4IQCMH.js";
4
4
  export {
5
5
  create
6
6
  };
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  create,
4
4
  cwd,
5
5
  getPackageManager
6
- } from "./chunk-3SSTN7F3.js";
6
+ } from "./chunk-DE4IQCMH.js";
7
7
 
8
8
  // src/index.ts
9
9
  import fs from "node:fs/promises";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-fumadocs-app",
3
- "version": "15.2.4",
3
+ "version": "15.2.6",
4
4
  "description": "Create a new documentation site with Fumadocs",
5
5
  "keywords": [
6
6
  "NextJs",
@@ -14,12 +14,14 @@
14
14
  "author": "Fuma Nama",
15
15
  "type": "module",
16
16
  "bin": "./dist/index.js",
17
+ "module": "./dist/create-app.js",
18
+ "types": "./dist/create-app.d.ts",
17
19
  "files": [
18
20
  "template/*",
19
21
  "dist/*"
20
22
  ],
21
23
  "dependencies": {
22
- "@clack/prompts": "^0.10.0",
24
+ "@clack/prompts": "^0.10.1",
23
25
  "cross-spawn": "^7.0.6",
24
26
  "picocolors": "^1.1.1"
25
27
  },
@@ -27,8 +29,8 @@
27
29
  "@types/cross-spawn": "^6.0.6",
28
30
  "@types/node": "22.14.0",
29
31
  "fast-glob": "^3.3.3",
30
- "eslint-config-custom": "0.0.0",
31
- "tsconfig": "0.0.0"
32
+ "tsconfig": "0.0.0",
33
+ "eslint-config-custom": "0.0.0"
32
34
  },
33
35
  "engines": {
34
36
  "node": ">=18.17.0"
@@ -0,0 +1,10 @@
1
+ import defaultMdxComponents from 'fumadocs-ui/mdx';
2
+ import type { MDXComponents } from 'mdx/types';
3
+
4
+ // use this function to get MDX components, you will need it for rendering MDX
5
+ export function getMDXComponents(components?: MDXComponents): MDXComponents {
6
+ return {
7
+ ...defaultMdxComponents,
8
+ ...components,
9
+ };
10
+ }
@@ -1,5 +1,4 @@
1
1
  import { source } from '@/lib/source';
2
- import type { Metadata } from 'next';
3
2
  import {
4
3
  DocsPage,
5
4
  DocsBody,
@@ -8,7 +7,8 @@ import {
8
7
  } from 'fumadocs-ui/page';
9
8
  import { notFound } from 'next/navigation';
10
9
  import { MDXContent } from '@content-collections/mdx/react';
11
- import defaultMdxComponents, { createRelativeLink } from 'fumadocs-ui/mdx';
10
+ import { createRelativeLink } from 'fumadocs-ui/mdx';
11
+ import { getMDXComponents } from '@/mdx-components';
12
12
 
13
13
  export default async function Page(props: {
14
14
  params: Promise<{ slug?: string[] }>;
@@ -24,12 +24,10 @@ export default async function Page(props: {
24
24
  <DocsBody>
25
25
  <MDXContent
26
26
  code={page.data.body}
27
- components={{
28
- ...defaultMdxComponents,
27
+ components={getMDXComponents({
29
28
  // this allows you to link to other pages with relative file paths
30
29
  a: createRelativeLink(source, page),
31
- // you can add other MDX components here
32
- }}
30
+ })}
33
31
  />
34
32
  </DocsBody>
35
33
  </DocsPage>
@@ -50,5 +48,5 @@ export async function generateMetadata(props: {
50
48
  return {
51
49
  title: page.data.title,
52
50
  description: page.data.description,
53
- } satisfies Metadata;
51
+ };
54
52
  }
@@ -6,7 +6,8 @@ import {
6
6
  DocsTitle,
7
7
  } from 'fumadocs-ui/page';
8
8
  import { notFound } from 'next/navigation';
9
- import defaultMdxComponents, { createRelativeLink } from 'fumadocs-ui/mdx';
9
+ import { createRelativeLink } from 'fumadocs-ui/mdx';
10
+ import { getMDXComponents } from '@/mdx-components';
10
11
 
11
12
  export default async function Page(props: {
12
13
  params: Promise<{ slug?: string[] }>;
@@ -23,12 +24,10 @@ export default async function Page(props: {
23
24
  <DocsDescription>{page.data.description}</DocsDescription>
24
25
  <DocsBody>
25
26
  <MDXContent
26
- components={{
27
- ...defaultMdxComponents,
27
+ components={getMDXComponents({
28
28
  // this allows you to link to other pages with relative file paths
29
29
  a: createRelativeLink(source, page),
30
- // you can add other MDX components here
31
- }}
30
+ })}
32
31
  />
33
32
  </DocsBody>
34
33
  </DocsPage>
@@ -1,9 +1,9 @@
1
1
  import { docs } from '@/.source';
2
2
  import { loader } from 'fumadocs-core/source';
3
3
 
4
- // `loader()` also assign a URL to your pages
5
4
  // See https://fumadocs.vercel.app/docs/headless/source-api for more info
6
5
  export const source = loader({
6
+ // it assigns a URL to your pages
7
7
  baseUrl: '/docs',
8
8
  source: docs.toFumadocsSource(),
9
9
  });
@@ -1,5 +1,6 @@
1
1
  import { defineDocs, defineConfig } from 'fumadocs-mdx/config';
2
2
 
3
+ // Options: https://fumadocs.vercel.app/docs/mdx/collections#define-docs
3
4
  export const docs = defineDocs({
4
5
  dir: 'content/docs',
5
6
  });