Entire Firebug source base has been moved on github.com last week and we are also adopting a new GIT development workflow. So far, everyone has been truly excited by this change and I believe that it's also much better way how to collaborate with other coders. Firebug is an open source project after all.
So, for those who are interested at forking Firebug repository, issuing a pull request, developing Firebug extension, etc. here are some basic things to know before you start.
Firebug Repository
There are already several repositories in Firebug's account, but the one you are probably interested the most is firebug
https://github.com/firebug/firebug
The structure of the repo is following:
- extension Firebug extension directory
- tests Firebug automated test files and test harness - FBTest
- trace Firebug tracing console - FBTrace
Here is how to clone the repository (read only):
$ git clone git://github.com/firebug/firebug.git
$ cd firebug/extension
Run Firebug From Source
The extension directory contains Firebug extension files and so, you can run Firebug off of it. It's also the best way how to quickly check your code changes.
- Locate your Firefox profile folder
- Open
extensions/
folder, create if it doesn't exist.
- Create a new text file and put the full path to your development folder inside. (e.g.
C:\firebug\extension\
or ~/firebug/extension/
). Windows users should retain the OS' slash direction, and everyone should remember to include a closing slash and remove any trailing spaces.
- Save the file with Firebug ID as it's name
firebug@software.joehewitt.com
Now you can modify the code base, restart Firefox (with Firebug extension installed) and see your changes live.
Build Firebug XPI
You probably don't need this that often, but you can also easily build Firebug XPI package. All you need is Apache Ant installed on your machine.
$ cd firebug/extension
$ ant
The result XPI file should be located in ./release
directory.
Push!
And now the most interesting part. You fixed a bug or implemented new API you need in your extension and you want us to pull your changes, commit into Firebug master branch and release! Let's see what you need to do.
Update: it's useful to create a separate branch for every contribution you make. (related to #4 and #5)
- First, you need a GitHub account. It's simple and all the cool kids are already there 😉
- Fork Firebug repository (see how to fork a repo).
- Clone your fork onto your local machine (your URL will be different):
$ git clone git@github.com:janodvarko/firebug.git
- Create a new branch, make your changes, stage/add modified files (e.g. firebug.js) and commit:
$ cd firebug/extension
$ git checkout -b myNewAPI
# Make your changes in firebug.js file now
$ git add content/firebug/firebug.js
$ git commit -m "New API for my extension"
- Push to origin (your public fork), the local branch myNewAPI to the remote branch myNewAPI:
$ git push -u origin myNewAPI
- Send a pull request. We'll review your changes and accept if all is OK!
Our release cycle is quick (a release at least every other week) so, your changes can be publicly available pretty soon!
Or Create a Patch
If you don't like github.com from some reason you can always create read-only clone (see at the beginning of this post), make your changes and generate a patch:
$ git diff > my-new-api.js
... or using svn:
$ svn diff > my-new-api.js
Finally, create a new issue report (Firebug official issue list is still at the same location) and attach your patch. Again, we'll review your changes and accept if all is OK!
Further Resources