-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from ruru-m07/registry/ui
feat(ui): implement registry system in www client
- Loading branch information
Showing
83 changed files
with
4,727 additions
and
340 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
pnpm prettier | ||
pnpm run --filter=./apps/www build:registry && pnpm prettier |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,5 @@ pnpm-lock.yaml | |
.github/**/*.md | ||
|
||
.content-collections/**/* | ||
|
||
**/*.mdx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
**/*.mdx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
// @ts-nocheck | ||
// This file is autogenerated by scripts/build-registry.ts | ||
// Do not edit this file directly. | ||
import * as React from "react"; | ||
|
||
export const Index: Record<string, any> = { | ||
components: { | ||
avatar: { | ||
name: "avatar", | ||
type: "components:ui", | ||
registryDependencies: undefined, | ||
component: React.lazy( | ||
() => import("@/../../packages/ui/src/components/avatar"), | ||
), | ||
source: "", | ||
files: ["@/../../packages/ui/src/components/avatar.tsx"], | ||
category: "undefined", | ||
subcategory: undefined, | ||
}, | ||
badge: { | ||
name: "badge", | ||
type: "components:ui", | ||
registryDependencies: undefined, | ||
component: React.lazy( | ||
() => import("@/../../packages/ui/src/components/badge"), | ||
), | ||
source: "", | ||
files: ["@/../../packages/ui/src/components/badge.tsx"], | ||
category: "undefined", | ||
subcategory: undefined, | ||
}, | ||
button: { | ||
name: "button", | ||
type: "components:ui", | ||
registryDependencies: undefined, | ||
component: React.lazy( | ||
() => import("@/../../packages/ui/src/components/button"), | ||
), | ||
source: "", | ||
files: ["@/../../packages/ui/src/components/button.tsx"], | ||
category: "undefined", | ||
subcategory: ["spinner"], | ||
}, | ||
checkbox: { | ||
name: "checkbox", | ||
type: "components:ui", | ||
registryDependencies: undefined, | ||
component: React.lazy( | ||
() => import("@/../../packages/ui/src/components/checkbox"), | ||
), | ||
source: "", | ||
files: ["@/../../packages/ui/src/components/checkbox.tsx"], | ||
category: "undefined", | ||
subcategory: undefined, | ||
}, | ||
input: { | ||
name: "input", | ||
type: "components:ui", | ||
registryDependencies: undefined, | ||
component: React.lazy( | ||
() => import("@/../../packages/ui/src/components/input"), | ||
), | ||
source: "", | ||
files: ["@/../../packages/ui/src/components/input.tsx"], | ||
category: "undefined", | ||
subcategory: undefined, | ||
}, | ||
select: { | ||
name: "select", | ||
type: "components:ui", | ||
registryDependencies: undefined, | ||
component: React.lazy( | ||
() => import("@/../../packages/ui/src/components/select"), | ||
), | ||
source: "", | ||
files: ["@/../../packages/ui/src/components/select.tsx"], | ||
category: "undefined", | ||
subcategory: undefined, | ||
}, | ||
spinner: { | ||
name: "spinner", | ||
type: "components:ui", | ||
registryDependencies: undefined, | ||
component: React.lazy( | ||
() => import("@/../../packages/ui/src/components/spinner"), | ||
), | ||
source: "", | ||
files: ["@/../../packages/ui/src/components/spinner.tsx"], | ||
category: "undefined", | ||
subcategory: undefined, | ||
}, | ||
switch: { | ||
name: "switch", | ||
type: "components:ui", | ||
registryDependencies: undefined, | ||
component: React.lazy( | ||
() => import("@/../../packages/ui/src/components/switch"), | ||
), | ||
source: "", | ||
files: ["@/../../packages/ui/src/components/switch.tsx"], | ||
category: "undefined", | ||
subcategory: undefined, | ||
}, | ||
textarea: { | ||
name: "textarea", | ||
type: "components:ui", | ||
registryDependencies: undefined, | ||
component: React.lazy( | ||
() => import("@/../../packages/ui/src/components/textarea"), | ||
), | ||
source: "", | ||
files: ["@/../../packages/ui/src/components/textarea.tsx"], | ||
category: "undefined", | ||
subcategory: undefined, | ||
}, | ||
tooltip: { | ||
name: "tooltip", | ||
type: "components:ui", | ||
registryDependencies: undefined, | ||
component: React.lazy( | ||
() => import("@/../../packages/ui/src/components/tooltip"), | ||
), | ||
source: "", | ||
files: ["@/../../packages/ui/src/components/tooltip.tsx"], | ||
category: "undefined", | ||
subcategory: undefined, | ||
}, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
--- | ||
title: Cli | ||
description: The CLI is a command-line interface that allows you to add components to your project. | ||
--- | ||
|
||
import { Tabs, Tab } from "fumadocs-ui/components/tabs"; | ||
|
||
## init | ||
|
||
Use the `init` command to initialize dependencies for a new project. | ||
|
||
The `init`, and CSS variables for the project. | ||
|
||
<Tabs items={["npm", "pnpm", "yarn", "bun"]}> | ||
<Tab value={"npm"}> | ||
```bash | ||
npx ruru-ui-cli@latest init | ||
``` | ||
</Tab> | ||
<Tab value={"pnpm"}> | ||
```bash | ||
pnpm dlx ruru-ui-cli@latest init | ||
``` | ||
</Tab> | ||
<Tab value={"yarn"}> | ||
```bash | ||
npx ruru-ui@latest init | ||
``` | ||
</Tab> | ||
<Tab value={"bun"}> | ||
```bash | ||
bunx --bun ruru-ui@latest init | ||
``` | ||
</Tab> | ||
</Tabs> | ||
|
||
|
||
```txt | ||
◇ Would you like to use TypeScript (recommended)? Yes | ||
◇ use default configuration. No | ||
◇ Where is your global CSS file? ./app/globals.css | ||
◇ Where is your tailwind.config.js located? ./tailwind.config.js | ||
◇ Would you like to use CSS variables for colors? Yes | ||
◇ Are you using a custom tailwind prefix eg. tw-? (Leave blank if not) (Leave blank if not) | ||
◇ Configure the import alias for components: @/components/ui | ||
◇ Configure the import alias for utils: @/lib/utils | ||
◇ Would you like to use RSC ? Yes | ||
◇ Write configuration to components.json. Proceed? Yes | ||
``` | ||
|
||
### Options | ||
|
||
The `init` command supports the following options: | ||
|
||
```txt | ||
Usage: Ruru-UI init [options] | ||
initialize your project and install dependencies | ||
Options: | ||
-y, --yes skip confirmation prompt. (default: false) | ||
-d, --defaults use default configuration. (default: false) | ||
-a, --autodetact autodetact configuration by freamwork. (default: false) | ||
-c, --cwd <cwd> the working directory. defaults to the current directory. | ||
(default: "D:\\GitHub\\ruru-ui\\apps\\sink") | ||
-h, --help display help for command | ||
``` | ||
|
||
|
||
## add | ||
|
||
Use the `add` command to add components to your project. | ||
|
||
The `add` command adds a component to your project and installs all required dependencies. | ||
|
||
<Tabs items={["npm", "pnpm", "yarn", "bun"]}> | ||
<Tab value={"npm"}> | ||
```bash | ||
npx ruru-ui-cli@latest add [component] | ||
``` | ||
</Tab> | ||
<Tab value={"pnpm"}> | ||
```bash | ||
pnpm dlx ruru-ui-cli@latest add [component] | ||
``` | ||
</Tab> | ||
<Tab value={"yarn"}> | ||
```bash | ||
npx ruru-ui@latest add [component] | ||
``` | ||
</Tab> | ||
<Tab value={"bun"}> | ||
```bash | ||
bunx --bun ruru-ui@latest add [component] | ||
``` | ||
</Tab> | ||
</Tabs> | ||
|
||
### Options | ||
|
||
The `add` command supports the following options: | ||
|
||
```txt | ||
Usage: Ruru-UI add [options] [components...] | ||
add a component to your project | ||
Arguments: | ||
components the components to add | ||
Options: | ||
-y, --yes skip confirmation prompt. (default: true) | ||
-o, --overwrite overwrite existing files. (default: false) | ||
-c, --cwd <cwd> the working directory. defaults to the current | ||
directory. (default: "D:\\GitHub\\ruru-ui\\apps\\sink") | ||
-a, --all add all available components (default: false) | ||
-p, --path <path> the path to add the component to. | ||
-h, --help display help for command | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.