研究调查问卷:请告诉我们您使用 Blockly 的体验
开始调查问卷
开始为 Blockly 做贡献
Blockly 是开源的,主要由小型团队进行维护。我们欢迎核心团队以外的开发者做出贡献;如果没有我们的社区,我们不可能构建每项请求的功能或修复用户报告的每项错误。本部分包含一些常规指南,尤其是在您刚开始接触开源开发时,可能会对您很有帮助。
如需了解您在做出贡献之前应该阅读的特定于 Blockly 的信息,请参阅为核心内容做贡献和为示例做贡献部分。
哪个代码库?
代码库包含单个项目的所有文件。Blockly 有两个代码库:blockly core 和 blockly-samples。
Blockly core 是 Blockly 库的代码库。如果您希望以适用于库中所有用户的方式更改核心 Blockly 行为,请使用此代码库。
Blockly 示例是示例、插件和 Codelab 的代码库。如果您想要创建或修改插件、编写 Codelab,或者创建或修改示例,请使用此代码库。
分步说明
您每次进行更改时,都需要按照以下常规步骤操作。
- 按照工具部分中的链接安装 Git 和 Node。
- 创建代码库分支并克隆代码库。GitHub 上提供了关于创建代码库分支的精彩教程。如需将其应用于块,只需将 octocat/Spoon-Knife 中的每个实例替换为 google/blockly 或 google/blockly-samples,具体取决于您要使用的代码库。
- 同步您的分支。GitHub 还提供了有关如何同步分支的教程。
- 查看 main 分支。在块核心中,这是
develop
分支。在 block-samples 中,这是 master
分支。
- 安装依赖项和构建工具,方法是在根目录中运行
npm install
。
- 通过在终端中运行
git checkout -b myBranchName
来创建新分支。该名称应该有助于您记住您正在进行的工作。
- 进行更改。
- 按照核心或示例指南验证您的更改。
- 使用
git commit -am "fix: My commit message"
保存更改。
详细了解提交消息。
- 使用
git push origin myBranchName
将您的更改推送到 GitHub。
- 代码准备就绪后打开拉取请求。Blockly 团队成员会审核您的更改,并在获得批准后将其合并到 Blockly 中。如需了解详情,请参阅 PR 审核流程。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2022-12-06。
[null,null,["最后更新时间 (UTC):2022-12-06。"],[[["Blockly is an open-source project maintained by a core team and welcomes contributions from the community to enhance its features and address bugs."],["Blockly has two repositories, \"blockly core\" for the library itself and \"blockly-samples\" for plugins, samples, and codelabs, and contributors should choose the appropriate repository based on their contribution."],["The contribution process involves forking the repository, syncing it, creating a new branch for changes, validating them, and ultimately opening a pull request for review by the Blockly team."],["Before making contributions, it's recommended to install Git and Node, familiarize yourself with GitHub's forking and syncing processes, and review the guidelines specific to contributing to Blockly core or samples."]]],[]]