Dev Workflow
Overview
AFFiNE repo includes web client, electron client, node server, plugin, and component. The different situation has different developing ways, and even more, some features, like cloud and login, need to mix more than one local development.
Prerequisites
-
Node.js version 18 and Install Git LFS
-
Git stable version
-
Yarn stable version
Prepare Code
For AFFiNE team members, just clone code from the repository directly.
For others, fork the repository and clone to the local:
-
Using GitHub Desktop:
-
Getting started with GitHub Desktop will guide you through setting up Desktop.
-
Once Desktop is set up, you can use it to fork the repo!
-
-
Using the command line:
- Fork the repo so that you can make your changes without affecting the original project until you’re ready to merge them.
Develop in Local
For different purposes and features, we the following guides:
Integrate Codes
After development in local, you should do following steps to commit and merge codes:
-
Read Testing Guide to make sure testing passing in CI. Running related tests around features you changes in local is the best way to ensure CI testing.
-
Read Style Guide to make sure code changes meeting the style requirements. We will run prettier and eslint with staged changes before commit, and run prettier, eslint and commitlint with all codes.
-
Read Commit Guide to know the PR merging process. We ask for using graphite to create PR in AFFiNE team. And for community contributors, fork repo and create PR is the way to create PR.
After Merge
After the codes are merged, we will release a hotfix version immediately if it is fatally fixed. Or, the next iteration version will contain those codes. You can keep eye on user release, more detail read Release Guide.