開始為 Blockly 貢獻心力
Blockly 為開放原始碼,主要是由小型團隊維護。我們非常重視核心團隊外開發人員的貢獻;因為在沒有社群成員的情況下,我們無法建構所有要求的功能或修正所有回報的錯誤。本節提供的一般指南可能對您有所幫助,尤其是剛接觸開放原始碼的開發作業時。
如要瞭解您在封鎖之前應閱讀的 Blockly 相關資訊,請參閱在核心上貢獻內容和為範例貢獻內容一節。
哪一個存放區?
存放區包含單一專案的所有檔案,Blockly 有兩個存放區:區塊核心和區塊範例。
Blockly Core 是 Blockly 程式庫的存放區。如果您想變更設定,以讓程式庫的所有使用者都能變更核心的 Blockly 行為,請使用這個存放區。
「Blockly 範例」是範例、外掛程式和程式碼研究室的存放區。當您要建立或修改外掛程式、編寫程式碼研究室、建立或修改範例時,請使用這個存放區。
操作方式
以下是您在進行變更時必須遵循的一般步驟。
- 按照「Tools」(工具) 區段中的連結安裝 Git 和節點。
- 建立分支並加以複製。GitHub 的教學課程存放區建立作業有很棒的教學課程。若要將其套用到區塊,只需根據您要使用的存放區,將每個 octocat/Spoon-Knife 執行個體替換為 google/blockly 或 google/blockly-samples 即可。
- 同步處理分支。GitHub 也提供了同步處理分支的教學課程。
- 請查看主要分支版本。在區塊核心中,這是
develop
分支版本。在區塊範例中,這是 master
分支。
- 安裝依附元件,並在根目錄執行
npm install
以建構工具。
- 在終端機中執行
git checkout -b myBranchName
,建立新的分支版本。這個名稱應有助於您記住自己目前的工作。
- 進行所需變更。
- 按照核心或範例指南驗證變更。
- 使用
git commit -am "fix: My commit message"
儲存變更。
進一步瞭解修訂版本訊息。
- 使用
git push origin myBranchName
將變更推送至 GitHub。
- 在程式碼準備就緒時開啟提取要求。Blockly 團隊成員會檢閱您所做的變更,並在核准後合併至 Blockly。詳情請參閱 PR 審核程序。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2022-12-06 (世界標準時間)。
[null,null,["上次更新時間: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."]]],[]]