We welcome your contributions to the development of SandTank. This document will help you with the process.
Workflow
- Ensure npm and git are installed.
- Fork hydroframe/SandTank.
Clone the repository to your computer and install dependencies.
$ git clone https://github.com/<username>/SandTank.git
$ cd SandTank
$ npm installCreate a feature branch.
$ git checkout -b new_feature
Start hacking.
Stage the changes to commit.
$ git add ./<path>/<to>/<file>
Commit changes using commitzen.
$ npm run commit
Push the branch:
$ git push origin new_feature
Create a pull request and describe the change.
Contributing to the Client
To contribute to the client:
- Follow the instructions to run the web application.
- Modify the code in
./client
and view the updates in the local web application. - Follow steps 6-9 in the workflow.
Coding Style
- When contributing to the client, follow the Airbnb JavaScript Style Guide.
- Use soft-tabs with a two space indent.
- Don’t put commas first.
Notice
- Don’t modify the version numbers in
package.json
. They are modified automatically.
Contributing Templates
After creating a new template, it is often helpful to contribute the new template to the main project. To contribute a template:
- Follow steps 1-4 in the Workflow instructions.
- Copy the new template directory into
./deploy/pvw/simulations/templates
inside the repository. - Document the new template by following the Documenting Templates instructions.
git add
the new template files and documentation changes for step 6 in the workflow.- Follow steps 7-9 in the workflow.
Updating the Documentation
After modifying the source code, it is often necessary to update the documentation.
See Documentation Update for more details.