Contribute
You'd like to contribute, that's fantastic! This guide will show you how to contribute to both the documentation and code.-
First and foremost, set up git and github
-
Create an apex-commons local folder. This will serve as your eclipse workspace folder.
$ mkdir apex-commons $ cd apex-commons
Steps to contribute to the documentation
-
Fork the apex-commons.github.com repo (guide to forking)
-
Open a terminal window and grab the fork (the following command will download the repo to your local drive)
$ git clone git@github.com:username/apex-commons.github.com.git $ cd apex-commons.github.com
- Install the jekyll ruby gem (obviously requires ruby be installed beforehand) and then start jekyll as a web server.
$ sudo gem install jekyll $ jekyll --server
-
Go to http://localhost:4000 and hopefully you see something that looks remotely like this site.
-
Make some changes! A basic understanding of jekyll is required but don’t worry, its easier than you’re probably thinking. See the jekyll usage guide.
-
Commit and push your changes back to github
$ git add . $ git commit -m 'my first commit to apex-commons!' $ git push origin master
- One more step. Submit a pull request (guide to pull requests) and this will notify folks with commit rights to the apex-commons github organization that changes are now available.
Steps to contribute to the code
-
Create a new developer edition salesforce org and clear out the existing code in that org.
-
Open Force.com IDE and when prompted to select a workspace, select the apex-commons folder you created (i.e. the /some/path/apex-commons folder).
- Fork one of the following repos (for this example, we’ll be using
base
).
base
chatter
environment
math
query
sort
visualforce
-
Create a new project with the exact same name as the repo (important!). In this example, name it base.
-
Enter your credentials and press Next.
- Choose None and press Finish
- Open a terminal window and go to your apex-commons local folder.
$ cd /some/path/apex-commons
- Add the code to your Force.com IDE project folder
$ cd base $ git init $ git remote add base git@github.com:username/base.git $ git pull base master $ cd base
- Refresh your Force.com project (Upon refresh, the code will be saved to your salesforce org).
-
Make some changes!
-
Commit and push
$ git add . $ git commit -m 'my first commit to apex-commons!' $ git push base master
- Submit pull request (guide to pull requests)