create-fumadocs-app 12.1.2 → 12.2.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.
|
@@ -3,7 +3,7 @@ import path from "node:path";
|
|
|
3
3
|
import fs from "node:fs/promises";
|
|
4
4
|
|
|
5
5
|
// versions.json
|
|
6
|
-
var versions_default = { "fumadocs-core": "12.
|
|
6
|
+
var versions_default = { "fumadocs-core": "12.2.0", "fumadocs-ui": "12.2.0", "fumadocs-mdx": "8.2.32", "fumadocs-contentlayer": "1.1.34" };
|
|
7
7
|
|
|
8
8
|
// ../create-app-versions/package.json
|
|
9
9
|
var package_default = {
|
|
@@ -77,7 +77,6 @@ var cwd = process.cwd();
|
|
|
77
77
|
async function create(options) {
|
|
78
78
|
const projectName = path.basename(options.outputDir);
|
|
79
79
|
const dest = path.resolve(cwd, options.outputDir);
|
|
80
|
-
await copy(path.join(sourceDir, `template/${options.template}`), dest);
|
|
81
80
|
await copy(path.join(sourceDir, `template/+shared`), dest, (name) => {
|
|
82
81
|
switch (name) {
|
|
83
82
|
case "example.gitignore":
|
|
@@ -86,6 +85,7 @@ async function create(options) {
|
|
|
86
85
|
return name;
|
|
87
86
|
}
|
|
88
87
|
});
|
|
88
|
+
await copy(path.join(sourceDir, `template/${options.template}`), dest);
|
|
89
89
|
if (options.tailwindcss) {
|
|
90
90
|
await copy(path.join(sourceDir, `template/+tailwindcss`), dest);
|
|
91
91
|
}
|
package/dist/create-app.js
CHANGED
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,12 +1,7 @@
|
|
|
1
|
-
import { pageTree } from '../source';
|
|
2
1
|
import { DocsLayout } from 'fumadocs-ui/layout';
|
|
3
2
|
import type { ReactNode } from 'react';
|
|
4
|
-
import {
|
|
3
|
+
import { docsOptions } from '../layout.config';
|
|
5
4
|
|
|
6
5
|
export default function Layout({ children }: { children: ReactNode }) {
|
|
7
|
-
return
|
|
8
|
-
<DocsLayout tree={pageTree} {...baseOptions}>
|
|
9
|
-
{children}
|
|
10
|
-
</DocsLayout>
|
|
11
|
-
);
|
|
6
|
+
return <DocsLayout {...docsOptions}>{children}</DocsLayout>;
|
|
12
7
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { type BaseLayoutProps } from 'fumadocs-ui/layout';
|
|
1
|
+
import { type BaseLayoutProps, type DocsLayoutProps } from 'fumadocs-ui/layout';
|
|
2
|
+
import { pageTree } from '../source';
|
|
2
3
|
|
|
3
|
-
//
|
|
4
|
+
// shared configuration
|
|
4
5
|
export const baseOptions: BaseLayoutProps = {
|
|
5
6
|
nav: {
|
|
6
7
|
title: 'My App',
|
|
@@ -13,3 +14,9 @@ export const baseOptions: BaseLayoutProps = {
|
|
|
13
14
|
},
|
|
14
15
|
],
|
|
15
16
|
};
|
|
17
|
+
|
|
18
|
+
// docs layout configuration
|
|
19
|
+
export const docsOptions: DocsLayoutProps = {
|
|
20
|
+
...baseOptions,
|
|
21
|
+
tree: pageTree,
|
|
22
|
+
};
|