Thanks for checking out the project!
- Please review our suggested commit message format.
- Please add tests for your changes.
- Tests are located in
test/
. - Run
npm test
to catch failing tests.
- Run
npm run lint
locally - Test the app with
npm run dev
If you found an error, typo, or any other issues, please report it using GitHub Issues. Try searching the issues to see if there is an existing report of your bug or feature request.
Provide as much detail as possible and if possible the steps to reproduce the problem. You could also include:
- A failing test
- Your environment: browser, operating system, etc
- Screenshot/gif (you can ctrl+v a clipboard picture to the github textarea)
- console error output
You will need to be familar with some javascript/node for logic/server code, react for front-end development, and of course the game itself!
- The core logic of the game is in the
lib/
directory: starting withlib/ShengJi.js
. - There is a corresponding folder called
test/
which contains tests for all thelib/
files. - Check npm commands in the
package.json
file (listed in the README).
- Fork the shengji repository
- Clone your fork to your local machine
git clone git@github.com:YOUR_NAME/shengji.git
git clone https://github.com/YOUR_NAME/shengji.git
- Run
npm install
in your local fork - Create a new branch for your fix:
git checkout -b my-fix-branch master
- Implement your bug fix or feature request
- Implement the tests for your fix or feature
- Run
npm run lint; npm test
a lot - Commit your code with a commit message that follows our commit message format if possible (otherwise we can do it)
- Push your branch to GitHub
git push origin my-fix-branch
- In GitHub, send a pull request to
hzoo:development
- If more changes are needed (from people's feedback)
- Make the required changes
- Run the tests/linters again
- Rebase your branch and then force push it to Github (updating the PR)
git rebase master -i
git push origin my-fix-branch -f
If there were changes pushed to the development branch while you were updating your PR, you will have to rebase your changes on top of the previous ones.
git pull --ff upstream master
- We are using jscs to check for coding style. Our config is here.