@adobe/cq-spa-component-mapping

中文文档
1.1.2发布于 2020/08/25Apache-2.0TypeScriptCommonJS近 30 天下载 4970
此软件包已被标记为弃用

Package has been renamed. Please use @adobe/aem-spa-component-mapping

原始使用文档
文档目录13 节
  1. Installation
  2. Usage
  3. MapTo
  4. API
  5. @adobe/cq-spa-component-mapping 1.1.2
  6. src/utils/MapComponents.js
  7. Documentation
  8. Changelog
  9. 1.1.1 - 24 August 2020
  10. 1.1.0 - 20 August 2020
  11. 1.0.3 - 28 September 2018
  12. 0.0.16 - 20 June 2018
  13. 0.0.15 - 20 April 2018

Table of contents

The package is deprecated

The package has been moved. Please use @adobe/aem-spa-component-mapping

Installation

npm install @adobe/cq-spa-component-mapping

Usage

This module provides helpers to map resource types with SPA components.

MapTo

The MapTo helper can be used to directly associate resource type(s) with a given SPA component.

import { MapTo } from '@adobe/spa-component-mapping';

class MyComponent {
    ...
}

export default MapTo('my/resource/type')(MyComponent);

API

@adobe/cq-spa-component-mapping 1.1.2

src/utils/MapComponents.js

Documentation

The technical documentation is already available, but if you are unable to solve your problem or you found a bug you can always contact us and ask for help!

Changelog

1.1.1 - 24 August 2020

  • Deprecating the package. Renaming to aem-spa-component-mapping

1.1.0 - 20 August 2020

  • Change codebase to TypeScript

1.0.3 - 28 September 2018

  • Windows OS support
  • Server-Side Rendering support
  • Modularization

0.0.16 - 20 June 2018

Public release of cq-spa-component-mapping

0.0.15 - 20 April 2018

Initial public release of cq-spa-component-mapping, which provides:

  • MapTo helper to map JS components with AEM resource types
  • ComponentMapping singleton to interact with the existing mappings

版本与发布记录

@adobe/cq-spa-component-mapping 共发布 18 个版本,首次发布于 2018/04/17;过去 12 个月发布了 0 个版本。

版本发布日期距今
1.1.2latest2020/08/256 年前
1.1.12020/08/246 年前
1.1.02020/08/206 年前
1.0.32018/09/288 年前
1.0.22018/09/288 年前
1.0.12018/09/288 年前

其他发布通道:beta → 0.0.16。

关于 @adobe/cq-spa-component-mapping 的常见问题

@adobe/cq-spa-component-mapping 是什么?

Installation * Usage * API * Documentation * Changelog注意:该包已被作者标记为弃用——Package has been renamed. Please use @adobe/aem-spa-component-mapping

如何安装 @adobe/cq-spa-component-mapping?

在项目目录运行 npm install @adobe/cq-spa-component-mapping,或使用 pnpm add / yarn add / bun add。

@adobe/cq-spa-component-mapping 支持 TypeScript 吗?

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

@adobe/cq-spa-component-mapping 支持 ESM 还是 CommonJS?

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

@adobe/cq-spa-component-mapping 可以商用吗?

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

@adobe/cq-spa-component-mapping 的下载量有多少?

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

@adobe/cq-spa-component-mapping 还在维护吗?

最新版本 1.1.2 发布于 2020/08/25(6 年前);至今共发布 18 个版本,其中过去 12 个月发布了 0 个;首次发布于 2018/04/17。作者已将其标记为弃用,新项目建议寻找替代方案。