@crestron/ch5-crcomlib

中文文档
2.20.0发布于 2026/10/14SEE LICENSE IN LICENSE.txtTypeScript近 30 天下载 1.3万

Crestron HTML5 (CH5) Components Library

原始使用文档
文档目录11 节
  1. See Crestron developer website for documentation
  2. Generated folders
  3. Activating extra information in the browser console
  4. For ch5 components
  5. For ch5 custom attributes (data-ch5-...)
  6. For the bridge-related functions/methods
  7. Build Dev Universal Module Definition
  8. Start
  9. localhost 3000 with parameters IP ID and Host
  10. What's New
  11. npm link

CH5 - Crestron Components library (CrComLib) - Getting Started

See Crestron developer website for documentation

https://www.crestron.com/developer Search for CRESTRON HTML5 USER INTERFACE

Generated folders

  • build_bundles/module_type - contains files generated by webpack (and the typescript compiler for the esm modules)
  • compiled_bundles/module_type - contains files generated by the typescript compiler (tsc)
  • docs/html

Where module_type is:

  • umd - UMD (contains CommonJs, AMD, and also creates a global property in the window object).
  • cjs - CommonJs
  • esm - ES Modules, ES6.
  • amd - Asynchronous Module Definition

Activating extra information in the browser console

For ch5 components

Ch5 components will display additional info in the browser console if they have a debug attribute defined. For example: <ch5-button debug label="Btn1"></ch5-button>

For ch5 custom attributes (data-ch5-...)

Additional information will be displayed in the browser console if the element has a debug attribute. For example: <div debug data-ch5-show="a_signal">Hello</div>

In order to display additional information, you must first enable this using the methods from Ch5Debug:

  • getConfig - Returns the current configuration: all keys that can be set and their current value. A key enables debug info for a method/function
  • loadConfig(cfg) - Loads a new config (replaces the previous one)
  • enableAll() - Enables all keys. Will display all debug info available. (The debug info that uses Ch5Debug, the info from ch5 components, and custom attributes will not be affected)
  • disablesAll() - Disables all keys
  • setConfigKeyValue(key:string, value:boolean) - Changes the value of a key

Build Dev Universal Module Definition

npm run build:dev:umd

Start

npm run start

localhost 3000 with parameters IP ID and Host

http://localhost:3000/?ipId=0x99&host=10.0.0.203

What's New

Updates to the Crestron HTML5 User Interface and documentation are avalilable in the following link https://sdkcon78221.crestron.com/sdk/Crestron_HTML5UI/Content/Topics/Whats-New.htm

cd crestron-components-lib npm link

cd CH5Sandbox\shell-template
npm link @crestron/ch5-crcomlib

版本与发布记录

@crestron/ch5-crcomlib 共发布 466 个版本,首次发布于 2019/06/21;过去 12 个月发布了 9 个版本。

版本发布日期距今
2.20.0latest2026/10/1427 天前
2.19.12026/09/012 个月前
2.19.02026/08/252 个月前
2.18.02026/07/074 个月前
2.17.42026/06/115 个月前
2.17.32026/05/205 个月前

其他发布通道:latest-beta → 1.1.0-beta.1,latest-dev → 99.0.448,latest-qe → 1.1.2。

关于 @crestron/ch5-crcomlib 的常见问题

@crestron/ch5-crcomlib 是什么?

Crestron HTML5 (CH5) Components Library

如何安装 @crestron/ch5-crcomlib?

在项目目录运行 npm install @crestron/ch5-crcomlib,或使用 pnpm add / yarn add / bun add。

@crestron/ch5-crcomlib 支持 TypeScript 吗?

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

@crestron/ch5-crcomlib 需要什么版本的 Node.js?

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

@crestron/ch5-crcomlib 可以商用吗?

@crestron/ch5-crcomlib 使用 SEE LICENSE IN LICENSE.txt 许可。许可条款写在包内的独立文件中,请阅读该文件确认可否商用。以上为概括,不构成法律意见,请以许可原文为准。

@crestron/ch5-crcomlib 的下载量有多少?

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

@crestron/ch5-crcomlib 还在维护吗?

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