# @appcorp/fusion-storybook 中文文档

规范地址：https://npmcn.com/package/%40appcorp/fusion-storybook/

版本：0\.5\.27
npm 元数据更新时间：2026-10-29T14:57:40.286Z
中文译文更新时间：2026-11-06T11:29:02.742Z
软件包许可：MIT

本文由上游 README 翻译，可能存在偏差，请结合原文核对 API、命令与配置。版权与许可归原作者所有。

原始 npm 页面：https://www.npmjs.com/package/%40appcorp/fusion-storybook
原文对照：https://npmcn.com/package/%40appcorp/fusion-storybook/?lang=original

## 关键信息（来自 npm 元数据）

- 包体积（解压后）：1.8 MB，481 个文件
- TypeScript 类型：未声明
- Node.js 要求：24
- 运行依赖：0 个
- 首次发布：2026-04-13T11:53:24.618Z
- 最新版本发布：2026-10-29T14:57:39.391Z
- 近 30 天下载量：3391（2026-10-07 至 2026-11-05，npm 官方下载统计）
- 已发布版本数：361（近 12 个月 361 个）

## 中文简介

一个用现代技术堆栈建造的组件库,用于多个项目的最大可重复性.

## 安装

```sh
npm install @appcorp/fusion-storybook
```

也可以使用：`pnpm add @appcorp/fusion-storybook`、`yarn add @appcorp/fusion-storybook`、`bun add @appcorp/fusion-storybook`

## README

# 融合故事书

一个用现代技术堆栈建造的组件库,用于多个项目的最大可重复性.

电话字段在数据状态下被作为仅可读取的位数值处理,格式化时仅用于仅可读取的视图和输入.

## 技术堆栈

-   **[下一个.js 16](https://nextjs.org/)** - 使用 App 路由器的响应框架
-   **[类型脚本](https://www.typescriptlang.org/)** - 类型安全 JavaScript
-   **[尾风 CSS v4](https://tailwindcss.com/)** - 功能第一CSS框架
-   **[沙克纳UI](https://ui.shadcn.com/)** - 在Radix UI上建造的无障碍组件库
-   **[故事集 10](https://storybook.js.org/)** - 构成部分发展和文件编制
-   **[ESLint 语录](https://eslint.org/)** - 暗号与下个规则同线
-   **[高级](https://prettier.io/)** - 以 Tailwind 类排序格式化代码
-   **[胡斯基](https://typicode.github.io/husky/)** - 质量执法的金钩
-   **[阶段](https://github.com/okonet/lint-staged)** - 在已显示的文件上运行插件
-   **[承诺](https://commitlint.js.org/)** - 执行常规承诺信息
-   **[欢乐](https://jestjs.io/)** - 单位和综合测试
-   **[剧作家](https://playwright.dev/)** - 端到端浏览器测试

## 开始

### 先决条件

-   节点.js 20+
-   npm 10+ (韩语)

### 安装

```bash
npm install
```

### 发展

```bash
npm run dev
```

打开 [http://localhost:3:00 (英语)](http://localhost:3000/) 以查看应用程序.

### 故事书

```bash
npm run storybook
```

打开 [http://localhost:6006 (英语)](http://localhost:6006/) 阅读故事书.

## 脚本

| 脚本 | 说明 |
| --- | --- |
| `npm run dev` | 启动 Next.js 开发服务器 |
| `npm run build` | 生产建筑 |
| `npm run start` | 启动生产服务器 |
| `npm run lint` | 运行 ESLint |
| `npm run lint:fix` | 使用自动修正运行 ESLint |
| `npm run format` | 用 Pretier 格式化所有文件 |
| `npm run format:check` | 检查格式而不写入 |
| `npm run storybook` | 启动 Storybook dev 服务器 |
| `npm run build-storybook` | 制作故事书 |
| `npm run test` | 运行 Jest 单元测试 |
| `npm run test:watch` | 以监视模式运行游戏 |
| `npm run test:ci` | 运行覆盖的 Jest( CI 模式) |
| `npm run test:e2e` | 运行 Playwright e2e 测试 |
| `npm run test:e2e:ui` | 使用 UI 运行 Playwright |
| `npm run test:e2e:report` | 打开 Playwright HTML 报告 |

## Git 工作流程

这个工程通过Husky git hooks执行代码质量:

### 承诺前

-   运行 `lint-staged` 仅用于显示文件的提示和格式

### 提交信件

-   强制执行 [常规武器委员会](https://www.conventionalcommits.org/) 格式通过承诺
-   实例:
    -   `feat: add new button component`
    -   `fix: resolve responsive layout issue`
    -   `docs: update README`
    -   `test: add unit tests for button`

### 预推

-   在推前运行完整的 Jest 测试套件

## 项目结构

```
fusion-storybook/
├── src/
│   ├── app/              # Next.js App Router
│   │   ├── globals.css   # Global styles with ShadcnUI CSS variables
│   │   ├── layout.tsx    # Root layout
│   │   └── page.tsx      # Home page
│   ├── components/
│   │   └── ui/           # ShadcnUI components
│   │       └── button.tsx
│   ├── lib/
│   │   └── utils.ts      # Utility functions (cn helper)
│   ├── hooks/            # Custom React hooks
│   ├── stories/          # Storybook stories
│   └── __tests__/        # Jest unit tests
├── tests/
│   └── e2e/              # Playwright e2e tests
├── .husky/               # Husky git hooks
├── .storybook/           # Storybook configuration
├── .vscode/              # VS Code settings
├── components.json       # ShadcnUI configuration
├── jest.config.ts        # Jest configuration
├── jest.setup.ts         # Jest setup (testing-library/jest-dom)
├── playwright.config.ts  # Playwright configuration
├── commitlint.config.ts  # Commitlint configuration
└── .prettierrc           # Prettier configuration
```

## 添加 ShadcnUI 组件

一旦 `shadcn` CLI可以到达注册,使用:

```bash
npx shadcn@latest add button
npx shadcn@latest add dialog
npx shadcn@latest add dropdown-menu
```

## VS 代码整合

为最佳发展经验安装建议的扩展:

-   **高级** - 代码格式化
-   **ESLint 语录** - 密码闪烁
-   **尾风 CSS 智能** - 尾风课的提示
-   **故事书** - 故事集成
-   **剧作家** - 试验跑道集成

默认情况下通过 `.vscode/settings.json`。 。 。 .

## 代码质量

-   **ESLint 语录** 执行 Next.js 和 TypeScript 最佳做法
-   **高级** 与 `prettier-plugin-tailwindcss` 尾风类
-   **阶段** 只在已显示的文件上运行 linters (快 !)
-   **承诺** 确保消息格式一致

## 常见问题

### @appcorp/fusion-storybook 是什么？

一个用现代技术堆栈建造的组件库,用于多个项目的最大可重复性\.

### 如何安装 @appcorp/fusion-storybook？

在项目目录运行 npm install @appcorp/fusion-storybook，或使用 pnpm add / yarn add / bun add。

### @appcorp/fusion-storybook 支持 TypeScript 吗？

该包的 package\.json 没有声明类型入口。需要类型提示时，可以在 npm 上查找社区维护的 @types/appcorp\_\_fusion-storybook 是否存在。

### @appcorp/fusion-storybook 需要什么版本的 Node\.js？

package\.json 的 engines 字段要求 Node\.js 24。版本不符时 npm 默认只给出警告，开启 engine-strict 后会拒绝安装。

### @appcorp/fusion-storybook 可以商用吗？

@appcorp/fusion-storybook 使用 MIT 许可。宽松许可：允许商业使用、修改和再分发，通常只需在分发时保留原版权与许可声明。以上为概括，不构成法律意见，请以许可原文为准。

### @appcorp/fusion-storybook 的下载量有多少？

根据 npm 官方下载统计，@appcorp/fusion-storybook 在 2026/10/07 – 2026/11/05 这 30 天内被下载 3,391 次，日均约 113 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入，适合横向比较热度，不能直接等同于使用人数。

### @appcorp/fusion-storybook 还在维护吗？

最新版本 0\.5\.27 发布于 2026/10/29（9 天前）；至今共发布 361 个版本，其中过去 12 个月发布了 361 个；首次发布于 2026/04/13。发布频率只是参考信号：功能稳定的工具可能很少需要更新，建议结合源码仓库的 issue 和提交记录判断。

