@cepharum/vue3-commons

中文文档
0.11.0发布于 2026/11/04MITTypeScriptESM + CJS零依赖近 30 天下载 4862

a library of Vue3 components and composables shared across cepharum applications

原始使用文档
文档目录6 节
  1. License
  2. Install
  3. Changes
  4. Manual
  5. Security
  6. Development

@cepharum/vue3-commons

A Vue3 library of components and composables shared across cepharum applications

License

MIT

Install

npm install -D @cepharum/vue3-commons

Changes

See CHANGELOG.md.

Manual

https://cepharum-foss.gitlab.io/vue3-commons/

For coding agents working in a consuming application, AGENTS.md is a condensed briefing, and the manual is served as llms.txt and llms-full.txt as well. Both digests are generated while building the manual, thus they do not drift from it.

Security

Found a vulnerability? Write to [email protected] rather than opening a public issue, or open a confidential one — SECURITY.md says what to include and why the order matters.

Development

npm run dev            # build the library, watching for changes
npm run docs:dev       # serve the manual, to this machine only
npm run docs:dev:lan   # serve the manual to the network, see below
npm run example:dev    # serve the example application and its mock backend

The manual is served to this machine alone unless asked otherwise. VitePress brings a Vite of its own — ^5.4, which is what its latest release pins — and that one carries dev-server advisories whose own precondition is a server published to the network: a bypass of server.fs.deny on Windows, and a path traversal in the handling of .map files. Neither reaches the published package, which contains none of this, nor the pipeline, which builds the manual rather than serving it. Use docs:dev:lan where reading the manual from another device is worth it, and on a network you trust.

npm test               # unit tests
npm run test:e2e       # end-to-end tests against the example application
npm run lint           # report findings, npm run lint:fix writes
npm run types:check    # compile the declarations and their usage
npm run audit          # known vulnerabilities of high severity and up
npm run sbom           # writes sbom.cdx.json, the bill of materials CI keeps

npm install writes the git hooks as well: ESLint fixes what it can before a commit and re-stages it, and a commit message is checked against Conventional Commits — feat, fix, docs, style, refactor, perf, test, build, ci, chore or revert, lowercase, imperative, no trailing period. A message which does not conform is rejected at commit time rather than in review. Set LEFTHOOK=0 to skip the hooks once, e.g. while rebasing history someone else wrote.

See examples/app for the application the end-to-end tests drive.

Publishing a version is done by hand, deliberately — see RELEASING.md for the sequence, for why no job does it, and for the one step no suite can do for you: looking at the thing.

In VS Code, these are available as tasks as well — Run Task offers them by name, and check: everything CI checks runs the sequence the pipeline runs. Personal editor settings stay out of the repository; the tasks are shared.

版本与发布记录

@cepharum/vue3-commons 共发布 8 个版本,首次发布于 2026/08/25;过去 12 个月发布了 8 个版本。

版本发布日期距今
0.11.0latest2026/11/045 天前
0.10.12026/11/027 天前
0.9.12026/10/2713 天前
0.9.02026/10/1425 天前
0.8.22026/09/082 个月前
0.8.12026/09/032 个月前

关于 @cepharum/vue3-commons 的常见问题

@cepharum/vue3-commons 是什么?

a library of Vue3 components and composables shared across cepharum applications

如何安装 @cepharum/vue3-commons?

在项目目录运行 npm install @cepharum/vue3-commons,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:vue(3)、@cepharum/vue3-i18n(0.5 || 1 || 2 || 3)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@cepharum/vue3-commons 支持 TypeScript 吗?

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

@cepharum/vue3-commons 支持 ESM 还是 CommonJS?

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

@cepharum/vue3-commons 可以商用吗?

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

@cepharum/vue3-commons 的下载量有多少?

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

@cepharum/vue3-commons 还在维护吗?

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