The following is a set of guidelines for contributing to Oasis. Please spend several minutes reading the article before you create an issue or pull request.
We have adopted the Contributor Covenant as its Code of Conduct, and we expect project participants to adhere to it. Please read the full text so that you can understand what actions will and will not be tolerated.
You can make use of the Github Issues for Oasis to:
- Report a bug.
- Request a feature
- Ask a question
Before reqorting an issue, please take the following steps:
- Search the existing issues.
- Clearly describe the issue including steps to reproduce when it is a bug.
- Provite an online example. Make use of jsFiddle, jsBin.
If you open an issue that does not conform to the requirements, it will be closed immediately.
To set up for contributing code, you will take a few steps:
- Ensure you have node.js installed. You can download Node.js from nodejs.org and make sure your Node.js is later than
12
. Usenode -v
to check your Node.js version. - Fork the Oasis repository.
- Run
npm run bootstrap
in your cloned folder to install all the dependencies for Oasis.
After setting up the environment of Oasis, you can make your change already. The only thing you should make sure is that you checked out the correct branch.
You can test your change by the following ways:
- Clone the oasis playground repository and write a demo for your change.
- Write an uint test in the Oasis repository and run
npm run test
to execute the uint test.
After you have made and tested your change, commit and push it to your fork. Then, open a Pull Request from your fork to the main Oasis repository on the branch you used in the Making a Change
section of this document.
If we ask for changes via code reviews then:
- Make the required updates to the code.
- Re-run the Angular test suites to ensure tests are still passing.
- Create a fixup commit and push to your GitHub repository (this will update your Pull Request):
git commit --all --fixup HEAD
git push
That's it! Thank you for your contribution!
A reviewer might often suggest changes to a commit message (for example, to add more context for a change or adhere to our commit message guidelines). In order to update the commit message of the last commit on your branch:
- Check out your branch:
git checkout my-fix-branch
- Amend the last commit and modify the commit message:
git commit --amend
- Push to your GitHub repository:
git push --force-with-lease
NOTE: If you need to update the commit message of an earlier commit, you can use
git rebase
in interactive mode. See the git docs for more details.
After your pull request is merged, you can safely delete your branch and pull the changes from the main (upstream) repository:
- Delete the remote branch on GitHub either through the GitHub web UI or your local shell as follows:
git push origin --delete my-fix-branch
- Check out the master branch:
git checkout master -f
- Delete the local branch:
git branch -D my-fix-branch
- Update your master with the latest upstream version:
git pull --ff upstream master
To ensure consistency throughout the source code, keep these rules in mind as you are working:
- All features or bug fixes must be tested by one or more specs (unit-tests).
- All public API methods must be documented.
- We use Prettier as an automatic code formatter. Run
npm run prettier
after making any changes to the code.
Thank you to all the people who have already contributed to Oasis!
// WIP: Contributors