From c7188e67f6a815fa4fea7e1b90c6f379e95ec10a Mon Sep 17 00:00:00 2001 From: winches <329487092@qq.com> Date: Fri, 28 Mar 2025 01:36:55 +0800 Subject: [PATCH] docs: sync api from heroui-cli v1.2.2 (#5111) Co-authored-by: GitHub Action --- apps/docs/config/routes.json | 5 +++-- apps/docs/content/docs/api-references/cli-api.mdx | 12 ++++++++---- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/apps/docs/config/routes.json b/apps/docs/config/routes.json index cb18dad14..97244520e 100644 --- a/apps/docs/config/routes.json +++ b/apps/docs/config/routes.json @@ -49,7 +49,7 @@ "keywords": "migrate, nextui, hero, heroui", "path": "/docs/guide/nextui-to-heroui.mdx" }, - { + { "key": "figma", "title": "Figma", "keywords": "figma, design, ui kit", @@ -471,7 +471,8 @@ "key": "cli-api", "title": "HeroUI CLI", "keywords": "api references, heroui, api, cli", - "path": "/docs/api-references/cli-api.mdx" + "path": "/docs/api-references/cli-api.mdx", + "updated": true }, { "key": "heroui-provider", diff --git a/apps/docs/content/docs/api-references/cli-api.mdx b/apps/docs/content/docs/api-references/cli-api.mdx index 0e4564fac..ad9fa5a21 100644 --- a/apps/docs/content/docs/api-references/cli-api.mdx +++ b/apps/docs/content/docs/api-references/cli-api.mdx @@ -34,7 +34,8 @@ Options: Commands: init [options] [projectName] Initializes a new project - add [options] [components...] Adds components to your project + add [options] [targets...] 1. Adds components to your project + 2. Adds HeroUI Chat codebase to your project upgrade [options] [components...] Upgrades project components to the latest versions remove [options] [components...] Removes components from the project list [options] Lists all components, showing status, descriptions, and versions @@ -100,27 +101,30 @@ HeroUI CLI v0.2.1 ### Add -Add HeroUI components to your project. +1. Add HeroUI components to your project. +2. Add HeroUI Chat codebase to your project. #### Features > 1. Auto add the missing required `dependencies` to your project > 2. Auto add the required `tailwindcss.config.js` configuration to your project > 3. Detect whether using pnpm, if so, add the required configuration to your `.npmrc` file +> 4. Add HeroUI Chat codebase to your project ```codeBlock bash -heroui add [components...] [options] +heroui add [targets...] [options] ``` #### Add Options -- `-a --all` [boolean] Add all the HeroUI components (default: `false`) +- `-a --all` [boolean] Add all components (default: `false`) - `-p --packagePath` [string] The path to the package.json file - `-tw --tailwindPath` [string] The path to the tailwind.config file file - `-app --appPath` [string] The path to the App.tsx file - `--prettier` [boolean] Add prettier format in the add content which required installed prettier - (default: `false`) - `--addApp` [boolean] Add App.tsx file content which required provider (default: `false`) - `-b --beta` [boolean] Add beta components (default: `false`) +- `-d --directory` [string] Add HeroUI Chat codebase to a specific directory ##### Example