@appcorp/fusion-storybook

中文文档
0.5.27发布于 2026/10/29MIT零依赖近 30 天下载 3391

A component library built with a modern tech stack for maximum reusability across multiple projects.

原始使用文档
文档目录15 节
  1. Tech Stack
  2. Getting Started
  3. Prerequisites
  4. Installation
  5. Development
  6. Storybook
  7. Scripts
  8. Git Workflow
  9. Pre-commit
  10. Commit Message
  11. Pre-push
  12. Project Structure
  13. Adding ShadcnUI Components
  14. VS Code Integration
  15. Code Quality

Fusion Storybook

A component library built with a modern tech stack for maximum reusability across multiple projects.

Phone fields are treated as canonical digits-only values in data state and are formatted only for presentation in read-only views and inputs.

Tech Stack

  • Next.js 16 - React framework with App Router
  • TypeScript - Type-safe JavaScript
  • Tailwind CSS v4 - Utility-first CSS framework
  • ShadcnUI - Accessible component library built on Radix UI
  • Storybook 10 - Component development and documentation
  • ESLint - Code linting with Next.js rules
  • Prettier - Code formatting with Tailwind class sorting
  • Husky - Git hooks for quality enforcement
  • lint-staged - Run linters on staged files
  • commitlint - Enforce conventional commit messages
  • Jest - Unit and integration testing
  • Playwright - End-to-end browser testing

Getting Started

Prerequisites

  • Node.js 20+
  • npm 10+

Installation

npm install

Development

npm run dev

Open http://localhost:3000 to view the app.

Storybook

npm run storybook

Open http://localhost:6006 to view the Storybook.

Scripts

ScriptDescription
npm run devStart Next.js development server
npm run buildBuild for production
npm run startStart production server
npm run lintRun ESLint
npm run lint:fixRun ESLint with auto-fix
npm run formatFormat all files with Prettier
npm run format:checkCheck formatting without writing
npm run storybookStart Storybook dev server
npm run build-storybookBuild Storybook for production
npm run testRun Jest unit tests
npm run test:watchRun Jest in watch mode
npm run test:ciRun Jest with coverage (CI mode)
npm run test:e2eRun Playwright e2e tests
npm run test:e2e:uiRun Playwright with UI
npm run test:e2e:reportOpen Playwright HTML report

Git Workflow

This project enforces code quality via Husky git hooks:

Pre-commit

  • Runs lint-staged which lints and formats only staged files

Commit Message

  • Enforces Conventional Commits format via commitlint
  • Examples:
    • feat: add new button component
    • fix: resolve responsive layout issue
    • docs: update README
    • test: add unit tests for button

Pre-push

  • Runs the full Jest test suite before pushing

Project Structure

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

Adding ShadcnUI Components

Once the shadcn CLI can reach the registry, use:

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

VS Code Integration

Install recommended extensions for the best development experience:

  • Prettier - Code formatting
  • ESLint - Code linting
  • Tailwind CSS IntelliSense - Tailwind class hints
  • Storybook - Storybook integration
  • Playwright - Test runner integration

Format on save is enabled by default via .vscode/settings.json.

Code Quality

  • ESLint enforces Next.js and TypeScript best practices
  • Prettier with prettier-plugin-tailwindcss auto-sorts Tailwind classes
  • lint-staged runs linters only on staged files (fast!)
  • commitlint ensures consistent commit message format

版本与发布记录

@appcorp/fusion-storybook 共发布 361 个版本,首次发布于 2026/04/13;过去 12 个月发布了 361 个版本。

版本发布日期距今
0.5.27latest2026/10/299 天前
0.5.252026/10/299 天前
0.5.232026/10/299 天前
0.5.212026/10/299 天前
0.5.192026/10/299 天前
0.5.172026/10/299 天前

关于 @appcorp/fusion-storybook 的常见问题

@appcorp/fusion-storybook 是什么?

A component library built with a modern tech stack for maximum reusability across multiple projects.

如何安装 @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 和提交记录判断。