Skip to content

Commit

Permalink
feature(packages/ui): Prepare ui package for Vercel deployment (#15251
Browse files Browse the repository at this point in the history
)

* update scripts

* add vercel config

* update styles import in preview

* update readme
  • Loading branch information
0xTxbi authored Dec 9, 2024
1 parent 2194442 commit 9227f4f
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/ui/.storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import '../lib/index.css'
import '../lib/styles/index.css'

export const parameters = {
actions: { argTypesRegex: '^on[A-Z].*' },
Expand Down
4 changes: 4 additions & 0 deletions packages/ui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

This package includes React Components used across our products.

## Component Playground

Explore the components at [storybook.unlock-protocol.com](https://storybook.unlock-protocol.com) – an interactive playground for testing and previewing.

## Using the package

First of all, you will need to run the `yarn build` command in root.
Expand Down
5 changes: 3 additions & 2 deletions packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@
"build": "yarn build:lib && yarn build:cdn && tsup ./lib/index.tsx --dts-only",
"build:lib": "vite build",
"build:cdn": "IS_CDN=1 && vite build",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build"
"storybook": "storybook dev -p 6006 -s public",
"build-storybook": "storybook build -s public",
"serve-storybook": "serve storybook-static"
},
"dependencies": {
"@headlessui/react": "2.2.0",
Expand Down
8 changes: 8 additions & 0 deletions packages/ui/vercel.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"$schema": "https://openapi.vercel.sh/vercel.json",
"buildCommand": "npm run build-storybook",
"devCommand": "npm run storybook",
"installCommand": "npm install",
"framework": null,
"outputDirectory": "./storybook-static"
}

0 comments on commit 9227f4f

Please sign in to comment.