Skip to content

贡献指南

¥Contribution Guide

zx 是一个完全的 开源项目,是由社区为社区开发的。我们欢迎任何形式的贡献,包括但不限于:

¥zx is a fully open-source project, which is developing by the community for the community. We welcome contributions of any kind, including but not limited to:

  • 错误报告

    ¥Bug reports

  • 功能请求

    ¥Feature requests

  • 代码贡献

    ¥Code contributions

  • 文档改进

    ¥Documentation improvements

  • 讨论

    ¥Discussions

社区准则

¥Community Guidelines

该项目遵循 Google 的开源社区准则。简而言之:所有贡献者都受到尊重和公平对待。

¥This project follows Google's Open Source Community Guidelines. In short: all contributors are treated with respect and fairness.

贡献者许可协议

¥Contributor License Agreement

对此项目的贡献必须附有贡献者许可协议。你(或你的雇主)保留你的贡献的版权;这只是允许我们作为项目的一部分使用和重新分发你的贡献。前往 https://cla.developers.google.com 查看你当前存档的协议或签署新协议。

¥Contributions to this project must be accompanied by a Contributor License Agreement. You (or your employer) retain the copyright to your contribution; this simply gives us permission to use and redistribute your contributions as part of the project. Head over to https://cla.developers.google.com to see your current agreements on file or to sign a new one.

你通常只需要提交一次 CLA,因此如果你已经提交了一份 CLA(即使是针对不同的项目),你可能不需要再次提交。

¥You generally only need to submit a CLA once, so if you've already submitted one (even if it was for a different project), you probably don't need to do it again.

如何贡献

¥How to Contribute

在提出更改之前,请在项目的 issues拉取请求 中查找类似的更改。如果你无法决定,请创建一个新的 discussion 主题,我们将帮助你解决。当准备好继续前进时:

¥Before proposing changes, look for similar ones in the project's issues and pull requests. If you can't decide, create a new discussion topic, and we will help you figure it out. When ready to move on:

  • 准备你的开发环境。

    ¥Prepare your development environment.

    • 确保你已安装 Node.js 20+。

      ¥Ensure you have Node.js 20+ installed.

    • Bash 对于运行 zx 脚本至关重要。Linux 和 macOS 用户通常默认安装它。如果你使用的是 Windows,请考虑使用 Linux 的 Windows 子系统git 重击

      ¥Bash is essential for running zx scripts. Linux and macOS users usually have it installed by default. Consider using Windows Subsystem for Linux or Git Bash if you are on Windows.

  • 复刻 存储库

    ¥Fork the repository.

  • 创建一个新分支。

    ¥Create a new branch.

  • 做出你的改变。

    ¥Make your changes.

    • 如果你要添加新功能,请包含其他测试。覆盖率阈值为 98%。

      ¥If you are adding a new feature, please include additional tests. The coverage threshold is 98%.

    • 创建符合 conventional-commits 的消息。

      ¥Create a conventional-commits compliant messages.

  • 确保一切正常:

    ¥Ensure that everything is working:

    • npm run fmt 来格式化你的代码。

      ¥npm run fmt to format your code.

    • npm run cov 运行测试。

      ¥npm run cov to run the tests.

  • 将更改推送到你的 fork。

    ¥Push the changes to your fork.

  • 创建拉取请求。

    ¥Create a pull request.

    • 详细描述你的改变。

      ¥Describe your changes in detail.

    • 如果适用,请参考任何相关问题。

      ¥Reference any related issues if applicable.

代码审查

¥Code Reviews

所有提交的内容,包括项目成员提交的内容,都需要审核。为此,我们使用 GitHub 拉取请求。有关使用拉取请求的更多信息,请参阅 GitHub 帮助

¥All submissions, including submissions by project members, require review. We use GitHub pull requests for this purpose. Consult GitHub Help for more information on using pull requests.

许可

¥License

该项目已获得 Apache-2.0 许可

¥The project is licensed under the Apache-2.0

google/zx 中文网 - 粤ICP备13048890号