@choosemycompany/ui

中文文档
1.4.0发布于 2026/11/04TypeScriptESM + CJS近 30 天下载 2093

ChooseMyCompany UI is a UI component library that implements , our design system. ChooseMyCompany UI is written in Vue.js and its objectives are to:

原始使用文档
文档目录6 节
  1. Usage
  2. Quick start - development
  3. Link the design system to test changes in you app
  4. Design tokens
  5. Releasing
  6. Rules of dev

ChooseMyCompany UI

ChooseMyCompany UI is a UI component library that implements , our design system. ChooseMyCompany UI is written in Vue.js and its objectives are to:

  • Create reusable UI components to accelerate frontend development.
  • Create UI consistency for all components within ChooseMyCompany.

Usage

  1. To use ChooseMyCompany UI in your project, add it as a dependency:

    pnpm add @choosemycompany/ui
    
  2. Include the required stylesheets in your app.

    @import "@choosemycompany/ui/dist/assets/index.css";
    
  3. Import the components as desired:

    import { CmcButton } from "@choosemycompany/ui";
    

    Note: ChooseMyCompany UI is compatible with tree-shaking, you may enable this in your project to reduce bundle sizes.

Quick start - development

Make sure you have Node 23.x (LTS) and pnpm 10.12 or newer.

# Clone the project
git clone [email protected]:choosemycompany/cmc-ui.git

# Navigate to the root of the project
cd cmc-ui

# Install the project
make install

Go to http://localhost:6006/

Create docker-compose.override.yml in cmc-frontend/

Example for the commercial service:

services:
  commercial:
    volumes:
      - ./commercial/docker-entrypoint.sh:/usr/local/bin/docker-entrypoint
      - ./commercial:/srv/app/commercial:cached
      - ./commercial/node_modules:/srv/app/commercial/node_modules:delegated
      - /tmp/.X11-unix:/tmp/.X11-unix
      - ../cmc-ui:/srv/app/cmc-ui

Create pnpmfile.local.cjs in /srv/app/commercial

module.exports = {
  hooks: {
    readPackage(pkg) {
      if (pkg.dependencies?.['@choosemycompany/ui']) {
        pkg.dependencies['@choosemycompany/ui'] = 'link:../cmc-ui';
      }
      return pkg;
    },
  },
};

Enable it locally via .npmrc (do not commit)

pnpmfile=pnpmfile.local.cjs

Now each time you want to see the design system changes in your application, just run pnpm build:lib in cmc-ui, it should reload your application with the updated components.

Design tokens

ChooseMyCompany UI uses design tokens to maintain a single source of truth that, through automation, can be formatted for different uses. Read more about design tokens on the Design Tokens Community Group.

Releasing

TriggerCI
Any branch or pull requestLint and tests
Merge into mainLint, tests, Storybook deployed to preprod
vX.Y.Z tagLint, tests, version check, npm publish, Storybook deployed to prod

The tag must match the version in package.json, and that version must be exactly one patch, minor or major step above the latest version published on npm.

  1. On develop, bump version in package.json in a pull request.

  2. Open a release pull request from develop to main and merge it with a merge commit, not a squash, so main and develop keep the same history.

  3. Check the Storybook in preprod.

  4. Tag main and push the tag:

    git fetch origin
    git tag v1.2.3 origin/main
    git push origin v1.2.3
    

Rules of dev

  • Constants that will be used by library users should be defined in <ComponentName>.constants.ts and constants used in the components must be placed in <ComponentName>.vue.ts.

版本与发布记录

@choosemycompany/ui 共发布 155 个版本,首次发布于 2025/07/07;过去 12 个月发布了 116 个版本。

版本发布日期距今
1.4.0latest2026/11/045 天前
1.3.02026/11/037 天前
1.2.22026/10/2911 天前
1.2.12026/10/2912 天前
1.2.02026/10/2813 天前
1.1.02026/10/2714 天前

关于 @choosemycompany/ui 的常见问题

@choosemycompany/ui 是什么?

ChooseMyCompany UI is a UI component library that implements , our design system. ChooseMyCompany UI is written in Vue.js and its objectives are to:

如何安装 @choosemycompany/ui?

在项目目录运行 npm install @choosemycompany/ui,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:@tiptap/vue-3(^2.27.2)、@tiptap/starter-kit(^2.27.2)、@tiptap/extension-link(^2.27.2)、@tiptap/extension-color(^2.27.2)、@tiptap/extension-image(^2.27.2)、@tiptap/extension-highlight(^2.27.2)、@tiptap/extension-underline(^2.27.2)、@tiptap/extension-text-align(^2.27.2)、@tiptap/extension-text-style(^2.27.2)、@tiptap/extension-placeholder(^2.27.2)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@choosemycompany/ui 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@choosemycompany/ui 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@choosemycompany/ui 可以商用吗?

@choosemycompany/ui 使用 未声明 许可。package.json 没有声明许可证。没有许可证的代码默认保留全部权利,商用前请联系作者或查看仓库中的 LICENSE 文件。以上为概括,不构成法律意见,请以许可原文为准。

@choosemycompany/ui 的下载量有多少?

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

@choosemycompany/ui 还在维护吗?

最新版本 1.4.0 发布于 2026/11/04(5 天前);至今共发布 155 个版本,其中过去 12 个月发布了 116 个;首次发布于 2025/07/07。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。