CLI: Allow code usage of create()

This commit is contained in:
Fuma Nama
2025-04-09 20:01:50 +08:00
parent b5ce255026
commit e9f2b7014a
4 changed files with 32 additions and 3 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'create-fumadocs-app': patch
---
Allow code usage of `create()`
+2
View File
@@ -14,6 +14,8 @@
"author": "Fuma Nama",
"type": "module",
"bin": "./dist/index.js",
"module": "./dist/create-app.js",
"types": "./dist/create-app.d.ts",
"files": [
"template/*",
"dist/*"
+24 -2
View File
@@ -16,13 +16,35 @@ export type Template =
export interface Options {
outputDir: string;
template: Template;
tailwindcss: boolean;
/**
* the package manager to use
*/
packageManager: PackageManager;
/**
* Create files inside `src`
*
* (Next.js only)
*/
useSrcDir?: boolean;
/**
* Configure Tailwind CSS
*
* (Next.js only)
*/
tailwindcss: boolean;
/**
* Configure Next.js ESLint plugin
*
* (Next.js only)
*/
eslint?: boolean;
installDeps?: boolean;
initializeGit?: boolean;
eslint?: boolean;
log?: (message: string) => void;
}
+1 -1
View File
@@ -4,4 +4,4 @@ const [err, _sourceConfig] = buildConfig(_source)
if (!_sourceConfig) throw new Error(err)
import { _runtime } from "fumadocs-mdx"
import * as _source from "./config"
export const docs = _runtimeAsync.doc<typeof _source.docs>([{"info":{"path":"index.mdx","absolutePath":"$cwd/packages/mdx/test/fixtures/index.mdx"},"data":{}}, {"info":{"path":"folder/test.mdx","absolutePath":"$cwd/packages/mdx/test/fixtures/folder/test.mdx"},"data":{}}], "docs", _sourceConfig)
export const docs = _runtimeAsync.doc<typeof _source.docs>([{"info":{"path":"index.mdx","absolutePath":"$cwd/packages/mdx/test/fixtures/index.mdx"},"data":{},"content":"# Hello World\n"}, {"info":{"path":"folder/test.mdx","absolutePath":"$cwd/packages/mdx/test/fixtures/folder/test.mdx"},"data":{},"content":""}], "docs", _sourceConfig)