@crestron/ch5-utilities

中文文档
2.19.0发布于 2026/08/25SEE LICENSE IN LICENSE.txtTypeScriptCommonJS近 30 天下载 6238

Crestron CH5 utilities

原始使用文档
文档目录26 节
  1. Table of Contents
  2. Background
  3. Setup
  4. Commands
  5. npm run start
  6. npm run start:archive
  7. Rename shell-template.ch5z to my-project-v1.0.0.ch5z
  8. Deploy my-project-v1.0.0.ch5z file to the TSW
  9. npm run start:distribute
  10. npm run start:js
  11. npm run start:js:archive
  12. npm run start:js:distribute
  13. npm run publish:local
  14. Configuration
  15. projectName
  16. directoryName
  17. outputDirectory
  18. outputLevel
  19. additionalAppuiManifestParameters
  20. additionalProjectManifestParameters
  21. controlSystemHost
  22. promptForCredential
  23. sftpDirectory
  24. deviceType
  25. contractFile
  26. License

CH5 Utilities - Getting Started

Archiving and distribution utilities to be used by the applications implemented with the CH5 Components Library.

Table of Contents

Background

The purpose of the library is to satisfy three functions:

  • archiving - create a package that can distributed manually or with the utility
  • distribution - deploy a package built with the utility
  • archive & distribute - single command for both above

The result of the archiving will be a .ch5z package. This contains two files:

  • *.ch5 - the actual package
  • *_manifest.json - a manifest file describing the .ch5 file ( project name, timestamp, hash and any other optional details)

Setup

Install the required packages.

npm install

Build the library.

npm run build

Publish the ch5-utilities library for local usage.

npm link

Commands

The commands is for development, debugging, and testing purposes only.

Before running, make sure that all the values are properly modified for local usage, in the config variable in start.ts.

npm run start

Running npm run start will run the archive&deploy functions based on the config in the src/start.ts file.

npm run start:archive

Running npm run start:archive will run the archive function based on the config in the src/start.ts file, sourceArchive should be undefined or empty string.

Rename shell-template.ch5z to my-project-v1.0.0.ch5z

Running npm run start:archive will rename shell-template.ch5z to my-project-v1.0.0.ch5z, sourceArchive should be shell-template.ch5z and projectName should be my-project-v1.0.0.ch5z.

Deploy my-project-v1.0.0.ch5z file to the TSW

Running npx ch5-cli deploy -p -H 10.0.0.61 -t touchscreen my-project-v1.0.0.ch5z to deploy the ch5z file to the TSW.

npm run start:distribute

Running npm run start:distribute will run the distribute function based on the config in the src/start.ts file.

npm run start:js

Same as npm run start:js, but will run the bundled JS version of the library ( the one in the build directory ).

npm run start:js:archive

Same as npm run start:archive, but will run the bundled JS version of the library ( the one in the build directory ).

npm run start:js:distribute

Same as npm run start:distribute, but will run the bundled JS version of the library ( the one in the build directory ).

npm run publish:local

After the initial setup, you can use this command to rebuild and publish changes in the library.

Configuration

The methods archiver and distributor from src/index.ts expect a to get a configuration of type IConfigOptions.

Below we describe each property, their purpose and possible values.

projectName

Required.

The name of the project will set the package name and the manifest details for the project. It should be set according to the delivered package.

Default value is crestron-system.

directoryName

Required.

This is the path to the directory that contains the deliverables.

Currently this is the showcase-app dist directory.

The path can be absolute or should be relative to the location from which the command is run in the CLI.

outputDirectory

Required.

This is the path where the package files will be copied to.

The path can be absolute or should be relative to the location from which the command is run in the CLI.

outputLevel

Optional

This sets the level of CLI logging that is required.

Possible values are: quiet | normal | verbose.

additionalAppuiManifestParameters

Optional.

This is a key-value collection that can be used to set extra details in the app ( in this case showcase-app ) manifest JSON file.

additionalProjectManifestParameters

Optional.

This is a key-value collection that can be used to set extra details in the project manifest JSON file.

controlSystemHost

Required.

This should be the hostname or IP address of the device where the package will be deployed.

promptForCredential

This will always be set to true, since the utility will always prompt for the credentials in the CLI.

sftpDirectory

Required.

This is the target directory on the controlSystemHost.

It must be relative to the SFTP root directory.

It will be display for the showcase-app, or HTML for CCS.

deviceType

Required.

This should be set based on the controlSystemHost, depending on what kind of device you are targeting for the deploy.

Possible values are: touchscreen | controlsystem | web.

contractFile

Optional

Relative or absolute file path for contract editor config file.File must have .cse2j extension.

License

Copyright (C) 2018 to the present, Crestron Electronics, Inc. All rights reserved. No part of this software may be reproduced in any form, machine or natural, without the express written consent of Crestron Electronics. Use of this source code is subject to the terms of the Crestron Software Development Tools License Agreement under which you licensed this source code.

If you did not accept the terms of the license agreement, you are not authorized to use this software. For the terms of the license, please see the license agreement between you and Crestron at http://www.crestron.com/sla.

版本与发布记录

@crestron/ch5-utilities 共发布 510 个版本,首次发布于 2019/06/05;过去 12 个月发布了 1 个版本。

版本发布日期距今
2.19.0latest2026/08/252 个月前
99.0.506latest-dev2021/07/315 年前
99.0.5052021/07/305 年前
99.0.5042021/07/295 年前
99.0.5032021/07/285 年前
99.0.5022021/07/275 年前

其他发布通道:latest-qe → 0.1.52,latest-dev → 99.0.506。

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

@crestron/ch5-utilities 是什么?

Crestron CH5 utilities

如何安装 @crestron/ch5-utilities?

在项目目录运行 npm install @crestron/ch5-utilities,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 ch5-utilities,可以用 npx ch5-utilities 直接运行。

@crestron/ch5-utilities 支持 TypeScript 吗?

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

@crestron/ch5-utilities 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

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

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

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

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

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

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