mirror of
https://github.com/hanzo-docs/docs.git
synced 2026-10-25 04:20:02 +00:00
CLI: Change name of the package to avoid npm errors
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@fumadocs/cli': patch
|
||||
---
|
||||
|
||||
Change name of the package to avoid npm errors
|
||||
@@ -727,7 +727,7 @@ function Features(): React.ReactElement {
|
||||
description="Fumadocs CLI creates interactive components for your docs, offering a rich experience to your users."
|
||||
>
|
||||
<CodeBlock
|
||||
code="npx fumadocs add files"
|
||||
code="npm fumadocs add files"
|
||||
lang="bash"
|
||||
wrapper={{
|
||||
title: 'Terminal',
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { type Registry } from 'fumadocs/build';
|
||||
import { type Registry } from '@fumadocs/cli/build';
|
||||
import * as ui from '../../../packages/ui/src/components/registry';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
|
||||
|
||||
@@ -20,7 +20,11 @@ This is a large update.
|
||||
Clone Fumadocs UI components to your workspace and modify them.
|
||||
|
||||
```package-install
|
||||
npx fumadocs add
|
||||
npm install @fumadocs/cli --save-dev
|
||||
```
|
||||
|
||||
```bash
|
||||
pnpm fumadocs add
|
||||
```
|
||||
|
||||
See [docs](/docs/cli) for details.
|
||||
|
||||
@@ -5,12 +5,16 @@ description: The CLI tool that automates setups and installing components.
|
||||
|
||||
## Installation
|
||||
|
||||
The CLI doesn't need to install any extra packages, but It needs Fumadocs Core for minimal setup.
|
||||
Note that it needs Fumadocs Core for minimal setup.
|
||||
|
||||
```package-install
|
||||
npm install @fumadocs/cli --save-dev
|
||||
```
|
||||
|
||||
You can initialize a config for CLI.
|
||||
|
||||
```package-install
|
||||
npx fumadocs config
|
||||
```bash
|
||||
pnpm fumadocs config
|
||||
```
|
||||
|
||||
It defines the output paths of components.
|
||||
@@ -19,14 +23,14 @@ It defines the output paths of components.
|
||||
|
||||
Select and install components.
|
||||
|
||||
```package-install
|
||||
npx fumadocs add
|
||||
```bash
|
||||
pnpm fumadocs add
|
||||
```
|
||||
|
||||
You can pass component names.
|
||||
|
||||
```package-install
|
||||
npx fumadocs add banner files
|
||||
```bash
|
||||
pnpm fumadocs add banner files
|
||||
```
|
||||
|
||||
#### How the magic works?
|
||||
@@ -43,20 +47,20 @@ Make sure to use the latest version of CLI
|
||||
|
||||
Generate files tree for Fumadocs UI `Files` component, using the `tree` command from your terminal.
|
||||
|
||||
```package-install
|
||||
npx fumadocs tree ./my-dir ./output.tsx
|
||||
```bash
|
||||
pnpm fumadocs tree ./my-dir ./output.tsx
|
||||
```
|
||||
|
||||
You can output MDX file too:
|
||||
|
||||
```package-install
|
||||
npx fumadocs tree ./my-dir ./output.mdx
|
||||
```bash
|
||||
pnpm fumadocs tree ./my-dir ./output.mdx
|
||||
```
|
||||
|
||||
See help for further details:
|
||||
|
||||
```package-install
|
||||
npx fumadocs tree -h
|
||||
```bash
|
||||
pnpm fumadocs tree -h
|
||||
```
|
||||
|
||||
#### Example Output
|
||||
@@ -85,8 +89,8 @@ export default (
|
||||
|
||||
Some features of Fumadocs require copying code to get started, it is similar to `codemod` but for configuring features automatically.
|
||||
|
||||
```package-install
|
||||
npx fumadocs init
|
||||
```bash
|
||||
pnpm fumadocs init
|
||||
```
|
||||
|
||||
Please note that some features may change your existing code, make sure to commit your changes to Git before running it.
|
||||
|
||||
@@ -16,8 +16,8 @@ For docs pages, Fumadocs has a built-in metadata image generator.
|
||||
|
||||
### Auto Setup
|
||||
|
||||
```package-install
|
||||
npx fumadocs init og-image
|
||||
```bash
|
||||
pnpm fumadocs init og-image
|
||||
```
|
||||
|
||||
### Manual Setup
|
||||
|
||||
@@ -7,8 +7,8 @@ description: Generating docs for OpenAPI schema
|
||||
|
||||
Using Fumadocs CLI.
|
||||
|
||||
```package-install
|
||||
npx fumadocs init openapi
|
||||
```bash
|
||||
pnpm fumadocs init openapi
|
||||
```
|
||||
|
||||
## Manual Setup
|
||||
|
||||
@@ -12,8 +12,8 @@ You can setup i18n using Fumadocs CLI or update the configurations manually.
|
||||
|
||||
Initialize i18n with CLI.
|
||||
|
||||
```package-install
|
||||
npx fumadocs init i18n
|
||||
```bash
|
||||
pnpm fumadocs init i18n
|
||||
```
|
||||
|
||||
## Manual Setup
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
"autoprefixer": "^10.4.20",
|
||||
"eslint-config-custom": "workspace:*",
|
||||
"fast-glob": "^3.3.1",
|
||||
"fumadocs": "workspace:*",
|
||||
"@fumadocs/cli": "workspace:*",
|
||||
"glslify": "^7.1.1",
|
||||
"glslx": "^0.3.0",
|
||||
"gray-matter": "^4.0.3",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { build, writeOutput } from 'fumadocs/build';
|
||||
import { build, writeOutput } from '@fumadocs/cli/build';
|
||||
import { registry } from '@/components/registry.mjs';
|
||||
|
||||
void build(registry).then(async (out) => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "fumadocs",
|
||||
"name": "@fumadocs/cli",
|
||||
"version": "0.0.1",
|
||||
"description": "The CLI tool for Fumadocs",
|
||||
"keywords": [
|
||||
@@ -19,7 +19,9 @@
|
||||
}
|
||||
},
|
||||
"main": "./dist/index.js",
|
||||
"bin": "./dist/index.js",
|
||||
"bin": {
|
||||
"fumadocs": "./dist/index.js"
|
||||
},
|
||||
"files": [
|
||||
"dist/*"
|
||||
],
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
"@types/react-dom": "^18.3.1",
|
||||
"algoliasearch": "4.24.0",
|
||||
"eslint-config-custom": "workspace:*",
|
||||
"fumadocs": "workspace:^",
|
||||
"@fumadocs/cli": "workspace:*",
|
||||
"lucide-react": "^0.453.0",
|
||||
"next": "15.0.0",
|
||||
"postcss": "^8.4.47",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import type { Registry } from 'fumadocs/build';
|
||||
import type { Registry } from '@fumadocs/cli/build';
|
||||
|
||||
const contextsMap = {
|
||||
'../contexts/sidebar.tsx': 'fumadocs-ui/provider',
|
||||
|
||||
Generated
+6
-6
@@ -168,6 +168,9 @@ importers:
|
||||
specifier: ^3.23.8
|
||||
version: 3.23.8
|
||||
devDependencies:
|
||||
'@fumadocs/cli':
|
||||
specifier: workspace:*
|
||||
version: link:../../packages/cli
|
||||
'@next/bundle-analyzer':
|
||||
specifier: 15.0.0
|
||||
version: 15.0.0([email protected])
|
||||
@@ -195,9 +198,6 @@ importers:
|
||||
fast-glob:
|
||||
specifier: ^3.3.1
|
||||
version: 3.3.2
|
||||
fumadocs:
|
||||
specifier: workspace:*
|
||||
version: link:../../packages/cli
|
||||
glslify:
|
||||
specifier: ^7.1.1
|
||||
version: 7.1.1
|
||||
@@ -1143,6 +1143,9 @@ importers:
|
||||
specifier: ^3.4.14
|
||||
version: 3.4.14
|
||||
devDependencies:
|
||||
'@fumadocs/cli':
|
||||
specifier: workspace:*
|
||||
version: link:../cli
|
||||
'@next/eslint-plugin-next':
|
||||
specifier: ^15.0.0
|
||||
version: 15.0.0
|
||||
@@ -1155,9 +1158,6 @@ importers:
|
||||
eslint-config-custom:
|
||||
specifier: workspace:*
|
||||
version: link:../eslint-config-custom
|
||||
fumadocs:
|
||||
specifier: workspace:^
|
||||
version: link:../cli
|
||||
lucide-react:
|
||||
specifier: ^0.453.0
|
||||
version: 0.453.0([email protected])
|
||||
|
||||
Reference in New Issue
Block a user