Follow these steps to contribute.
-
Find an issue that needs assistance by searching for the Help Wanted tag.
-
Let us know you are working on it by posting a comment on the issue.
Remember to feel free to ask for help in our Contributors Gitter room.
Working on your first Pull Request? You can learn how from this free series How to Contribute to an Open Source Project on GitHub
command | description |
---|---|
npm setup |
install all dependencies |
npm run dev |
start application in development |
npm test |
run all tests |
npm commit |
this is an interactive tool to help build a commit message |
Prerequisites | version |
---|---|
npm | 5.8.0 |
node | 8.11.2 |
- Install Git or your favorite Git client.
- (Optional) Setup an SSH Key for GitHub.
- Install Node
- Install npm
- Go to the top level classroom-mode repository: https://github.com/freeCodeCamp/classroom-mode
- Click the "Fork" Button in the upper right hand corner of the interface (More Details Here)
- After the repository (repo) has been forked, you will be taken to your copy of the classroom-mode repo at https://github.com/yourUsername/classroom-mode
- Open a Terminal / Command Line / Bash Shell in your projects directory (i.e.:
/yourprojectdirectory/
) - Clone your fork of classroom-mode
$ git clone https://github.com/yourUsername/classroom-mode.git
(make sure to replace yourUsername
with your GitHub username)
This will download the entire classroom-mode repo to your projects directory.
- Change directory to the new classroom-mode directory (
cd classroom-mode
) - Add a remote to the official classroom-mode repo:
$ git remote add upstream https://github.com/freeCodeCamp/classroom-mode.git
Congratulations, you now have a local copy of the classroom-mode repo!
Now that you have a copy of your fork, there is work you will need to do to keep it current.
Do this prior to every time you create a branch for a PR:
- Make sure you are on the
master
branch
$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
If your aren't on master
, resolve outstanding files / commits and checkout the master
branch
$ git checkout master
- Do a pull with rebase against
upstream
$ git pull --rebase upstream master
This will pull down all of the changes to the official master branch, without making an additional commit in your local repo.
- (Optional) Force push your updated master branch to your GitHub fork
$ git push origin master --force
This will overwrite the master branch of your fork.
Before you start working, you will need to create a separate branch specific to the issue / feature you're working on. You will push your work to this branch.
Name the branch something like fix/xxx
or feature/xxx
where xxx
is a short description of the changes or feature you are attempting to add. For example fix/email-login
would be a branch where you fix something specific to email login.
To create a branch on your local machine (and switch to this branch):
$ git checkout -b [name_of_your_new_branch]
and to push to GitHub:
$ git push origin [name_of_your_new_branch]
If you need more help with branching, take a look at this.
Once you have classroom-mode cloned, before you start the application, you first need to install all of the dependencies:
# Install dependencies
npm install
Then you need to add the private environment variables
# Create a copy of the "variables.sample.env" and name it as "variables.env".
# Populate it with the necessary secrets:
# macOS / Linux
cp variables.env.sample variables.env
# Windows
copy variables.env.sample variables.env
Then edit the variables.env
file and modify the keys only for parts that you will use.