---
url: 'https://dxpr.com/zh-hans/hc/documentation/learn-dxpr-builder/development/contributing'
title: '参与贡献 | DXPR'
author:
  name: Jurriaan
  url: 'https://dxpr.com/users/jurriaan'
date: '2026-10-24T00:41:48+00:00'
updated: '2026-10-24T09:09:48+00:00'
copyright: 'Copyright DXPR. All rights reserved.'
type: article
summary: 'DXPR Builder 的开发在 GitHub 的 github.com/dxpr/dxpr_builder 进行。所有贡献遵循仓库 CONTRIBUTING.md 所述流程。'
tags:
  - Tooling
image: 'https://dxpr.com/themes/custom/dxpr_com/images/dxpr-share-card.jpg'
published: true
og:
  site_name: DXPR
  updated_time: '2026-10-24T09:09:48+0000'
  'image:alt': 'DXPR, powered by Drupal: AI-powered Drupal for marketers.'
schema:
  '@context': 'https://schema.org'
  '@graph':
    -
      mainEntity: {  }
    -
      '@type': TechArticle
      headline: 参与贡献
      description: 'DXPR Builder 的开发在 GitHub 的 github.com/dxpr/dxpr_builder 进行。所有贡献遵循仓库 CONTRIBUTING.md 所述流程。'
      image:
        '@type': ImageObject
        url: 'https://dxpr.com/themes/custom/dxpr_com/images/dxpr-share-card.jpg'
        width: '1200'
        height: '630'
      datePublished: '2026-10-24T00:41:48+0000'
      dateModified: '2026-10-24T09:09:48+0000'
      author:
        '@type': Organization
        '@id': 'https://dxpr.com/#organization'
        name: DXPR
        url: 'https://dxpr.com/'
        logo:
          '@type': ImageObject
          url: 'https://dxpr.com/themes/custom/dxpr_com/dxpr-logo-dark.svg'
          width: '1348'
          height: '501'
      publisher:
        '@type': Organization
        '@id': 'https://dxpr.com/#organization'
        name: DXPR
        url: 'https://dxpr.com/'
        logo:
          '@type': ImageObject
          url: 'https://dxpr.com/themes/custom/dxpr_com/dxpr-logo-dark.svg'
          width: '1348'
          height: '501'
      mainEntityOfPage: 'https://dxpr.com/zh-hans/hc/documentation/learn-dxpr-builder/development/contributing'
      articleSection: 工具链
    -
      '@type': WebPage
      '@id': 'https://dxpr.com/zh-hans/hc/documentation/learn-dxpr-builder/development/contributing'
      description: 'DXPR Builder 的开发在 GitHub 的 github.com/dxpr/dxpr_builder 进行。所有贡献遵循仓库 CONTRIBUTING.md 所述流程。'
      breadcrumb:
        '@type': BreadcrumbList
        itemListElement:
          -
            '@type': ListItem
            position: 1
            name: 首页
            item: 'https://dxpr.com/zh-hans'
      publisher:
        '@type': Organization
        '@id': 'https://dxpr.com/#organization'
        name: DXPR
      inLanguage: zh-hans
---
[帮助中心](/zh-hans/node/75)/[文档](/zh-hans/hc/documentation) /[学习 DXPR Builder](/zh-hans/hc/documentation/learn-dxpr-builder) /[扩展](/zh-hans/hc/documentation/learn-dxpr-builder/extend) /[工具链](/zh-hans/hc/documentation/learn-dxpr-builder/extend/tooling) # 参与贡献.

 学习 DXPR Builder扩展工具链

   ## 本指南内容

DXPR Builder 的开发在 GitHub 的 [github.com/dxpr/dxpr\_builder](https://github.com/dxpr/dxpr_builder) 进行。所有贡献遵循仓库 [CONTRIBUTING.md](https://github.com/dxpr/dxpr_builder/blob/3.x/CONTRIBUTING.md) 所述流程。

## Git 工作流

1. 每个拉取请求必须关联 GitHub issue
2. 分支命名规范：`person/target-branch/#issue-description`（例如 `jur/3.x/#42-fix-carousel-autoplay`）
3. 原子提交遵循 [alphagov Git 风格指南](https://github.com/alphagov/styleguides/blob/master/git.md)
4. 拉取请求必须简短描述解决方案
5. 改动保持在 issue 范围内：不做无关的格式调整或重构

## 代码所有者

[@jjroelofs](https://github.com/jjroelofs) 是代码所有者。没有他们的检查，任何拉取请求都不能合并。

## 编码规范

- PHP：[Drupal 编码规范](https://www.drupal.org/docs/develop/standards)
- JavaScript：只用 ES6+（新代码不用 `var`，不用 jQuery）。遵循 [Airbnb JavaScript 编码规范](https://github.com/airbnb/javascript)及项目例外
- CSS：遵循 [设计系统](https://github.com/dxpr/dxpr_builder/blob/3.x/DESIGN-SYSTEM.md)的自定义属性和令牌命名
- 更改元素的 `showed` 方法必须包含更新后的 `dxpr_frontend.js`。从点击容器保存按钮时编辑器输出到浏览器控制台的完整输出生成它。
- 新功能需要 QA Analytics 覆盖。

克隆后运行一次 `npm install`。它安装 Husky pre-commit 钩子，检查您暂存的文件；请参阅 [测试](/zh-hans/hc/documentation/learn-dxpr-builder/development/testing)。

## 运行端到端测试

测试通过 PR 评论中的斜杠命令触发：

| 命令 | 说明 |
|---|---|
| `/e2e` | 运行完整的 BS5 编辑器和匿名套件 |
| `/e2e groups=group-name` | 运行指定的测试分组 |
| `/e2e tests=ClassName` | 运行指定的测试类 |
| `/e2e-bs3` | 运行 BS3 编辑器套件 |
| `/e2eV2` | 在 DXPR CMS 栈上运行 BS5 套件 |
| `/e2e maven_ref=branch` | 用自定义 `dxpr_maven` 分支测试 |

当构建器改动需要测试改动时，QA 工程师在分支上更新 `dxpr_maven`，您在拉取请求上运行 `/e2e maven_ref=<branch>`。构建器的拉取请求先合并，再合并 `dxpr_maven` 的。

## 请求检查之前

1. 实现改动
2. 仔细测试
3. 做一轮清理/重构
4. 重新测试，确认没有破坏
5. 用干净的 git 历史提交并推送
6. 检查代码检查通过
7. 在 PR 上评论 `/e2e` 运行回归测试
8. 所有检查通过后请求检查