You must have installed the following softwares on you computer:
First, the project must be cloned on you local machine. To do it, use the following command line.
git clone https://github.com/KleeGroup/focus-components.git
Be sure to be positionned on the right branch develop
.
git checkout develop
Synchronize the branch. To do so, execute the following command to synchronize latest modifications on your local repository:
git fetch
Then, execute the following command to download the latest version (latest modification) of the branch develop
:
git pull
Your are "up-to-date" on the develop
branch.
As we don't want FOCUS developers to commit directly on this branch, you have to fork it and submit Git pull requests.
To create a new branch, you can use this command:
git checkout -b fix-panel
Your current local branch is now fix-panel
.
Choose the branch name you prefer. However, we recommend using the following prefixes:
fix-
[name of the fix]feature-
[name of the new feature]
Fix-
branch must be used to fix some code issues.
Feature-
branch must be used to develop new features.
- develop your new feature or fix the issue you've detected
- update the tests ; that's really important as we want to guarantee the best developer and user exeprience
- before pushing the result of your work, please increase the version number of FOCUS-COMPONENTS in the
package.json
file. For example:
{
...
"version": "0.7.3-beta1",
...
}
What's really important is to increase the version number and suffix it by
-beta[number]
.For example, if the version number is currently 0.7.2 (corresponding to the latest release number), please update it to
0.7.3-beta1
.
Once you've finished your developments, push it to the github server. To do so, you have to:
- identify your modifications and add file for a commit. For example:
git add src/components/panel/index.js
- commit your modification by using the command:
git commit -m '[panel] the purpose of your commit'
- your commit is local, so don't forget to push it on the github repository, by using this command:
git push
Once you finished your developments and commited it, you can create a pull request so your work can be merged to the develop
branch, so that the FOCUS community enjoys.
Two ways of creating it :
When you consult project's Github page https://github.com/KleeGroup/focus-components, a message is displayed encouraging you to create a pull request. Then click on Compare & pull request
button.
Other solution is to create a pull request, by clicking on pull request icon :
Follow the following Pull request template, depending on the type of content you wish to submit:
- You propose a new feature, please read how to write a pull request to share a new feature
- You propose a fix, please read how to write a pull request to share a fix
Role of FOCUS administrator is to validate pull requests.
Below the procedure of validation:
- Add a label
Review needed
- Read the pull request
- Comment the code, or open discution with the developer if needed
- If the pull request suits the FOCUS team, validate it and merge it.
- Complete the current draft release note to add the feature / fix to the note.