Skip to content

Commit

Permalink
feat
Browse files Browse the repository at this point in the history
  • Loading branch information
zbeyens committed Sep 24, 2024
1 parent 2fadcdc commit 156a10c
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 16 deletions.
8 changes: 6 additions & 2 deletions apps/www/content/docs/components/cli.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ title: CLI
description: Use the CLI to add components to your project.
---

<Callout>
<Callout className="mt-6">
WIP – We're migrating to <Link href="https://ui.shadcn.com/docs/cli">npx shadcn</Link>.
</Callout>

{/* <Callout>
**Note:** We are now using the `shadcn` CLI.
Expand Down Expand Up @@ -172,4 +176,4 @@ Options:
-y, --yes skip confirmation prompt. (default: false)
-c, --cwd <cwd> the working directory. defaults to the current directory.
-h, --help display help for command
```
``` */}
10 changes: 7 additions & 3 deletions apps/www/content/docs/components/components-json.mdx
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
---
title: plate-components.json
title: components.json
description: Configuration for your project.
---

The `plate-components.json` file holds configuration for your project.
<Callout className="mt-6">
WIP – We're migrating to <Link href="https://ui.shadcn.com/docs/components-json">shadcn's components.json</Link>.
</Callout>

{/* The `plate-components.json` file holds configuration for your project.
We use it to understand how your project is set up and how to generate components customized for your project.
Expand Down Expand Up @@ -163,4 +167,4 @@ The CLI will use this value to determine where to place your UI components. Use
"plate-ui": "@/components/plate-ui"
}
}
```
``` */}
2 changes: 1 addition & 1 deletion apps/www/content/docs/components/installation/next.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ A <Link href="https://github.com/udecode/plate/tree/main/templates/plate-templat
Run the `init` command to create a new Next.js project or to setup an existing one:

```bash
npx shadcn@latest init
npx @udecode/plate-ui@latest init
```

### Configure plate-components.json
Expand Down
6 changes: 3 additions & 3 deletions apps/www/content/docs/components/installation/vite.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,10 @@ export default defineConfig({

### Run the CLI

Run the `shadcn` init command to setup your project:
Run `@udecode/plate-ui` init command to setup your project:

```bash
npx shadcn@latest init
npx @udecode/plate-ui@latest init
```

### Configure plate-components.json
Expand Down Expand Up @@ -129,7 +129,7 @@ We use icons from <Link href="https://lucide.dev">Lucide</Link>. You can use any
You can now start adding components to your project.

```bash
npx shadcn@latest add button
npx @udecode/plate-ui@latest add button
```

The command above will add the `Button` component to your project. You can then import it like this:
Expand Down
8 changes: 6 additions & 2 deletions apps/www/content/docs/components/theming.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ title: Theming
description: Using CSS Variables or Tailwind CSS for theming.
---

You can choose between using CSS variables or Tailwind CSS utility classes for theming.
<Callout className="mt-6">
WIP – We're migrating to <Link href="https://ui.shadcn.com/docs/theming">npx shadcn</Link>.
</Callout>

{/* You can choose between using CSS variables or Tailwind CSS utility classes for theming.
## Utility classes
Expand Down Expand Up @@ -185,4 +189,4 @@ You can now use the `warning` utility class in your components.
We recommend using <Link href="https://www.smashingmagazine.com/2021/07/hsl-colors-css/">HSL colors</Link> for theming but you can also use other color formats if you prefer.
See the <Link href="https://tailwindcss.com/docs/customizing-colors#using-css-variables">Tailwind CSS documentation</Link> for more information on using `rgb`, `rgba` or `hsl` colors.
See the <Link href="https://tailwindcss.com/docs/customizing-colors#using-css-variables">Tailwind CSS documentation</Link> for more information on using `rgb`, `rgba` or `hsl` colors. */}
7 changes: 3 additions & 4 deletions apps/www/public/r/styles/default/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@
"dependencies": [
"tailwindcss-animate",
"class-variance-authority",
"lucide-react"
],
"registryDependencies": [
"utils"
"lucide-react",
"@udecode/cn"
],
"registryDependencies": [],
"tailwind": {
"config": {
"plugins": [
Expand Down
4 changes: 3 additions & 1 deletion apps/www/scripts/build-registry.mts
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,7 @@ async function buildStylesIndex() {
"tailwindcss-animate",
"class-variance-authority",
"lucide-react",
"@udecode/cn"
]

// TODO: Remove this when we migrate to lucide-react.
Expand All @@ -445,7 +446,8 @@ async function buildStylesIndex() {
name: style.name,
type: "registry:style",
dependencies,
registryDependencies: ["utils"],
// registryDependencies: ["utils"],
registryDependencies: [],
tailwind: {
config: {
plugins: [`require("tailwindcss-animate")`],
Expand Down

0 comments on commit 156a10c

Please sign in to comment.