Skip to content

Commit

Permalink
feat: add @shadcn/ui cli (#112)
Browse files Browse the repository at this point in the history
  • Loading branch information
shadcn authored Mar 8, 2023
1 parent b043cf7 commit be701cf
Show file tree
Hide file tree
Showing 28 changed files with 2,871 additions and 108 deletions.
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": ["@changesets/changelog-github", { "repo": "shadcn/ui" }],
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": ["www", "playground", "**-template"]
}
5 changes: 5 additions & 0 deletions .changeset/khaki-roses-rule.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@shadcn/ui": patch
---

Initial commit.
45 changes: 45 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Adapted from create-t3-app.

name: Publish

on:
push:
branches:
- main

concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
build:
if: ${{ github.repository_owner == 'shadcn' }}
name: Create a PR for release workflow
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Use PNPM
uses: pnpm/[email protected]

- name: Use Node.js 18
uses: actions/setup-node@v3
with:
node-version: 18
cache: "pnpm"

- name: Install NPM Dependencies
run: pnpm install

- name: Create Version PR or Publish to NPM
id: changesets
uses: changesets/[email protected]
with:
commit: "chore(release): version packages"
title: "chore(release): version packages"
publish: pnpm build:cli
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}
NODE_ENV: "production"
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ dist
node_modules
.next
build
.contentlayer
.contentlayer
apps/www/pages/api/components.json
4 changes: 2 additions & 2 deletions apps/www/components/main-nav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { allDocs } from "contentlayer/generated"
import { siteConfig } from "@/config/site"
import { cn } from "@/lib/utils"
import { Icons } from "@/components/icons"
import { buttonVariants } from "@/components/ui/button"
import {
NavigationMenu,
NavigationMenuContent,
Expand All @@ -16,8 +17,7 @@ import {
NavigationMenuTrigger,
navigationMenuTriggerStyle,
} from "@/components/ui/navigation-menu"
import { buttonVariants } from "./ui/button"
import { Separator } from "./ui/separator"
import { Separator } from "@/components/ui/separator"

export function MainNav() {
return (
Expand Down
4 changes: 2 additions & 2 deletions apps/www/components/ui/command.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import * as React from "react"
import { DialogProps } from "@radix-ui/react-dialog"
import { Command as CommandPrimitive, useCommandState } from "cmdk"
import { ChevronsUpDown, Search } from "lucide-react"
import { Command as CommandPrimitive } from "cmdk"
import { Search } from "lucide-react"

import { cn } from "@/lib/utils"
import { Dialog, DialogContent } from "@/components/ui/dialog"
Expand Down
Loading

3 comments on commit be701cf

@vercel
Copy link

@vercel vercel bot commented on be701cf Mar 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

next-template – ./templates/next-template

next-template-shadcn.vercel.app
template.shadcn.com
next-template-git-main-shadcn.vercel.app

@vercel
Copy link

@vercel vercel bot commented on be701cf Mar 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

example-playground – ./examples/playground

example-playground-git-main-shadcn-pro.vercel.app
example-playground.vercel.app
example-playground-shadcn-pro.vercel.app

@vercel
Copy link

@vercel vercel bot commented on be701cf Mar 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

ui – ./apps/www

ui.shadcn.com
ui-shadcn-pro.vercel.app
ui-git-main-shadcn-pro.vercel.app

Please sign in to comment.