Skip to content

Latest commit

 

History

History
69 lines (47 loc) · 2 KB

CONTRIBUTING.md

File metadata and controls

69 lines (47 loc) · 2 KB

The project is split into 2 parts: the server, and the client.

Sending a Pull Request

  1. Fork the repo
  2. Clone it to your machine
git clone [email protected]:<yourusername>/letscube.git
cd letscube
git remote add upstream [email protected]:coder13/letscube.git
  1. Sync your local master branch with upstream:
get checkout master
git pull upstream master
  1. Create a new feature branch:
git checkout -b feature-branch
  1. Commit and push the changes:
git push -u
  1. Go to the repository and make a Pull Request to the dev branch.

Installing and Running:

npm install in the root directory installs the pre-commit hook.

to start the bash server:

cd server/
npm install
npm start

to start the client dev server:

cd client/
npm install
npm start

Pre-commit hook

When installed properly, the pre-commit hook won't let you commit without the client and server being properly linted and tests being ran.

Linting

Both the client and the server use eslint and a slight variation of airbnb's style guide.

Tests

LetsCube is currently using Jest and Enzyme for testing. Right now there is very minimal tests but I would like to add much more coverage in time. For any complicated computational code, it should be tested to make sure there are no errors.

Nit picky stuff:

This project uses React: A component should be made whenever something gets too complicated (like with the timesTable) or if it's going to be used repeatedly.

Redux: I'd like to keep the number of reducers relatively low. Please get in contact with me before adding another reducer.

Socket.IO: A common code pattern I found myself using is socket events to send information from a client and a separate event to echo the data to clients. If not done properly and one event was used for both, an infinite loop would happen. Take this into consideration when creating events that echo to other users.