Skip to content

leno23/react-ui-library

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@wuyangfan/nova-ui Monorepo

企业级 React 组件库工程,包含:

  1. packages/ui:可发布的组件库包 @wuyangfan/nova-ui
  2. docs:基于 VitePress 的文档站与在线示例

技术栈

  • React 18 + TypeScript
  • Tailwind CSS v3
  • ESLint + Prettier
  • tsup(ESM/CJS + d.ts)
  • VitePress 文档

本地开发

npm install
npm run dev:docs

构建

npm run build:ui
npm run build:docs
npm run build

发布 npm

当前仓库已配置 GitHub Actions 自动发布流程:

  • 触发条件:push 到 main
  • 流程:安装依赖 -> 构建 UI 包 -> 若版本未发布则自动 npm publish

你需要在 GitHub 仓库 Secrets 中配置:

  • NPM_TOKEN:具有发布 @wuyangfan/nova-ui 权限的 npm token(建议 granular token,支持 bypass 2FA)

发布文档到 GitHub Pages

仓库已包含自动部署工作流 .github/workflows/docs-deploy.yml

  1. push 到 main 后会自动构建并发布 docs
  2. 在 GitHub 仓库设置中打开 Settings -> Pages -> Source: GitHub Actions
  3. 发布地址为:https://leno23.github.io/react-ui-library/

包使用方式

import '@wuyangfan/nova-ui/styles.css'
import { Button, ThemeProvider } from '@wuyangfan/nova-ui'

export function App() {
  return (
    <ThemeProvider mode="light">
      <Button>Hello Nova UI</Button>
    </ThemeProvider>
  )
}

About

A React UI Library

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors