Skip to content

Contributing to the Codebase

ches edited this page Sep 3, 2011 · 25 revisions

1. Installing the require software

1.1. Git

Git is a free & open source, distributed version control system designed to handle everything from small to very large projects with speed and efficiency. The distributed nature of git allows for optimal collaboration, and as such is the SCM of choice for the jquery.tools project.

Download & Resources
Book

2. Getting the code

git clone git://github.com/jquerytools/jquerytools.git

3. Pick a branch

We may have more then 1 active branch, aka 1.2 and 1.1.2:

git branch --track 1-1-2-stable origin/1-1-2-stable
git checkout 1-1-2-stable

4. Running the jquery.tools test suite

Depends on the final test framework, but loading the tests in a browser will work. Coverage should include all A grade browsers (this might be annoying for people to do, but is very important).

5. Forking jquery.tools
git clone git://github.com/jquerytools/jquerytools.git
cd jquerytools
git checkout -b my_new_branch_full_of_awesome

6. Code Writing

6.1. Testing

All code changes, fixes, refactorings, and additions require adequate test coverage. This is to ensure the stability of the code base, and that future contributions do not break current features.

Read about our testing requirements.

6.2. New Features and Code additions

The jQuery.tools team welcomes code additions and features. The new additions must conform to the projects direction and philosophy, generally accepted javascript best pattern idioms.

7. Re-integration

7.1. Updating your copy of jquerytools

Update your copy of jQuery.tools. It is likely that other changes to jQuery.tools have happened while you were working. Go get them:

git checkout master
git pull

Now apply your patch on top of the latest changes:

git checkout my_new_branch_full_of_awesome
git rebase master

No conflicts? Tests still pass? Change still seems reasonable to you? Then move on.

Further information on the git rebase located at http://book.git-scm.com/4_rebasing.html

7.2. Submitting the code

7.2.1. Patch Submission

git commit -a
git format-patch master --stdout > my_new_patch.diff

7.2.2. Github fork/pull request cycle

We also accept code submissions via the Github fork/pull request cycle. Which is discussed at length: http://github.com/guides/pull-requests