@brightspace-ui/labs

中文文档
2.64.12发布于 2026/11/04Apache-2.0ES Module近 30 天下载 2902

A collection of experimental web components and tools for building Brightspace applications.

原始使用文档
文档目录5 节
  1. Installation
  2. Developing and Contributing
  3. Testing
  4. Running the demos
  5. Versioning and Releasing

@brightspace-ui/labs

NPM version

A collection of experimental web components and tools for building Brightspace applications.

Installation

Install from NPM:

npm install @brightspace-ui/labs

Developing and Contributing

After cloning the repo, run npm install to install dependencies.

Testing

To run the full suite of tests:

npm test

Alternatively, tests can be selectively run:

# eslint
npm run lint:eslint

# stylelint
npm run lint:style

# translations
npm run test:translations

# accessibility tests
npm run test:axe

# unit tests
npm run test:unit

This repo uses @brightspace-ui/testing's vdiff command to perform visual regression testing:

# vdiff
npm run test:vdiff

# re-generate goldens
npm run test:vdiff golden

Running the demos

To start a @web/dev-server that hosts the demo pages and tests:

npm start

D2L employees can also view the latest main-branch demos at https://live.d2l.dev/BrightspaceUI/labs/.

Versioning and Releasing

This repo is configured to use semantic-release. Commits prefixed with fix: and feat: will trigger patch and minor releases when merged to main.

To learn how to create major releases and release from maintenance branches, refer to the semantic-release GitHub Action documentation.

版本与发布记录

@brightspace-ui/labs 共发布 164 个版本,首次发布于 2022/05/17;过去 12 个月发布了 62 个版本。

版本发布日期距今
2.64.12latest2026/11/044 天前
2.64.112026/10/309 天前
2.64.102026/10/309 天前
2.64.92026/10/2415 天前
2.64.82026/10/2415 天前
2.64.72026/10/2415 天前

其他发布通道:release-2.8.x → 2.8.2,release-2.24.x → 2.24.5。

关于 @brightspace-ui/labs 的常见问题

@brightspace-ui/labs 是什么?

A collection of experimental web components and tools for building Brightspace applications.

如何安装 @brightspace-ui/labs?

在项目目录运行 npm install @brightspace-ui/labs,或使用 pnpm add / yarn add / bun add。

@brightspace-ui/labs 支持 TypeScript 吗?

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

@brightspace-ui/labs 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@brightspace-ui/labs 可以商用吗?

@brightspace-ui/labs 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@brightspace-ui/labs 的下载量有多少?

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

@brightspace-ui/labs 还在维护吗?

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