如果您正在考慮讓 Karma 變得更好,或者您只是想修改它,那太好了!以下是一些關於如何設定 Karma 工作區以及如何發送良好的 Pull Request 的技巧。
$ git clone https://github.com/<your-username>/karma.git
$ cd karma
$ npm install
透過以下方式執行測試
$ npm test
# or you can run test suits individually
$ npm run test:unit
$ npm run test:e2e
$ npm run test:client
透過以下方式檢查程式碼
$ npm run lint
# or you can also apply auto-fixes where possible
$ npm run lint:fix
透過以下方式建構客戶端程式碼
$ npm run build
# or use the watch mode
$ npm run build:watch
簽出一個新的分支,並根據您打算執行的操作為其命名
feature-
。fix-
。docs-
。$ git checkout -b <branch_name>
開啟您喜歡的編輯器,進行一些更改,執行測試,更改程式碼,執行測試,更改程式碼,執行測試等等。
$ git commit -m "..."
$ npm run commit:check
$ git push origin <branch_name>
發送 Pull Request 後,其他開發人員將審查並討論您的更改。請處理所有意見。一切順利後,其中一位維護人員將合併您的更改。
發送 Pull Request 之前,請簽署我們的貢獻者授權協議 (CLA)。若要接受任何程式碼更改,必須簽署 CLA。我們保證這是一個快速的過程!