@commercetools-docs/rmf-codegen

中文文档
13.56.0发布于 2026/09/29MIT构建来源已验证近 30 天下载 4660

Provides RMF-Codegen to javascript projects

原始使用文档
文档目录3 节
  1. Prerequisites
  2. Usage
  3. Maintenance

commercetools RMF-Codegen provider package

This package provides the REST Modeling Framework's rmf-codegen CLI to javascript projects without separate installation or version choice steps.

The RMF-Codegen version is defined via the rmfCodegenVersion property in package.json and refers to the GitHub release version of RMF-Codgen.

RMF-Codegen is a java program. Java needs to be available on the command line to run the rmf-codegen commands. Binary executables are possible but not provided as pre-built downloads yet. Read more...

Prerequisites

A Java 8 or newer java runtime is required to be installed and available on the path. rmf-codegen is downloaded automatically at install time.

rmf-codegen was chosen over other (native JS and/or official) RAML parsers because it proved to be the only implementation that can correctly and reliably load even extremely large API definitions in very short time where others fail to load the same API definition at all.

Usage

Typical usage is to include it as a development dependency

yarn add --dev @commercetools-docs/rmf-codegen

and then run it inside the project directory

npx rmf-codegen

See the RMF-Codegen README for all available options and features. Alternatively refer to the help output of the bundled rmf-codegen for current options and details, for example npx rmf-codegen generate

You can provide the command globally too via npm install -g @commercetools-docs/rmf-codegen, but for this purpose it may be better suited to use the install script directly provided by RMF-Codegen.

Maintenance

To update the rmf-codegen version, update the custom rmfCodegenVersion property in package.json.

The rmf-codegen JAR is downloaded from the project's GitHub releases page.

For more help on getting an appropriate version, create an issue here - https://github.com/commercetools/rmf-codegen/issues.

版本与发布记录

@commercetools-docs/rmf-codegen 共发布 88 个版本,首次发布于 2020/12/01;过去 12 个月发布了 7 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
13.56.0latest2026/09/291 个月前
13.54.02026/08/132 个月前
13.53.02026/07/163 个月前
13.52.02026/07/143 个月前
13.51.02026/02/268 个月前
13.50.02026/02/248 个月前

其他发布通道:canary → 0.0.0-canary-202181074244。

关于 @commercetools-docs/rmf-codegen 的常见问题

@commercetools-docs/rmf-codegen 是什么?

Provides RMF-Codegen to javascript projects

如何安装 @commercetools-docs/rmf-codegen?

在项目目录运行 npm install @commercetools-docs/rmf-codegen,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 rmf-codegen、raml-markdownlint,可以用 npx rmf-codegen 直接运行。

@commercetools-docs/rmf-codegen 支持 TypeScript 吗?

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

@commercetools-docs/rmf-codegen 需要什么版本的 Node.js?

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

@commercetools-docs/rmf-codegen 可以商用吗?

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

@commercetools-docs/rmf-codegen 的下载量有多少?

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

@commercetools-docs/rmf-codegen 还在维护吗?

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