diff --git a/.travis.yml b/.travis.yml
index 26804033f5..b6bd11e2c2 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,7 +1,7 @@
language: node_js
-services:
- - mongodb
-
node_js:
- - '0.10'
\ No newline at end of file
+ - 'node'
+ - '1.6.4'
+
+sudo: false
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index ba4e245107..6830f00dc5 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -1,2 +1,12 @@
We're getting a lot of duplicate issues and bug reports that just aren't reporting actual bugs.
So, before you submit your issue, please read the [Help I've Found a Bug](https://github.com/FreeCodeCamp/FreeCodeCamp/wiki/Help-I've-Found-a-Bug) wiki page.
+
+We welcome pull requests from Free Code Camp campers (our students) and seasoned JavaScript developers alike! Follow these steps to contribute:
+
+1. Check our [public Waffle Board](https://waffle.io/freecodecamp/freecodecamp).
+2. Pick an issue that nobody has claimed and start working on it. If your issue isn't on the board, open an issue. If you think you can fix it yourself, start working on it. Feel free to ask for help in our [Gitter](https://gitter.im/FreeCodeCamp/FreeCodeCamp).
+3. Fork the project ([Need help with forking a project?](https://help.github.com/articles/fork-a-repo/)). You'll do all of your work on your forked copy.
+4. Create a branch specific to the issue or feature you are working on. Push your work to that branch. ([Need help with branching?](https://github.com/Kunena/Kunena-Forum/wiki/Create-a-new-branch-with-git-and-manage-branches))
+5. 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 I fix something specific to email login.
+6. You should have [ESLint running in your editor](http://eslint.org/docs/user-guide/integrations.html), and it will highlight anything doesn't conform to [Free Code Camp's JavaScript Style Guide](https://github.com/FreeCodeCamp/FreeCodeCamp/wiki/Free-Code-Camp-JavaScript-Style-Guide) (you can find a summary of those rules [here](https://github.com/FreeCodeCamp/FreeCodeCamp/blob/staging/.eslintrc). Please do not ignore any linting errors, as they are meant to **help** you and to ensure a clean and simple code base. Make sure none of your JavaScript is longer than 80 characters per line.
+7. Once your code is ready, submit a [pull request](https://github.com/FreeCodeCamp/FreeCodeCamp/wiki/Pull-Request-Contribute) from your branch to Free Code Camp's `staging` branch. We'll do a quick code review and give you feedback, then iterate from there. It may also be helpful to read about git [rebasing](https://github.com/FreeCodeCamp/FreeCodeCamp/wiki/git-rebase).
diff --git a/README.md b/README.md
index dba5013540..0611cd1816 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-
+
[](https://waffle.io/freecodecamp/freecodecamp/metrics)
@@ -7,7 +7,7 @@
Welcome to Free Code Camp's open source codebase!
=======================
-Free Code Camp is an open-source community of busy people who learn to code, then build projects for nonprofits.
+Free Code Camp is an open-source community of busy people who learn to code and build projects for nonprofits.
Our campers (students) start by working through our free, self-paced, browser-based curriculum. Next, they build several practice projects. Finally, we pair two campers together with a stakeholder from a nonprofit organization, and help them build the solution the nonprofit has requested.
@@ -15,7 +15,7 @@ Our campers (students) start by working through our free, self-paced, browser-ba
80% of our campers are over 25, and nearly a fifth of our campers are women.
-This code is running live at [FreeCodeCamp.com](http://www.FreeCodeCamp.com). We also have [Gitter](https://gitter.im/FreeCodeCamp/FreeCodeCamp), a [blog](http://blog.freecodecamp.com), and even a [Twitch.tv channel](http://twitch.tv/freecodecamp).
+This code is running live at [FreeCodeCamp.com](http://www.FreeCodeCamp.com). We also have [Gitter](https://gitter.im/FreeCodeCamp/FreeCodeCamp), a [blog](http://medium.freecodecamp.com), and even a [Twitch.tv channel](http://twitch.tv/freecodecamp).
[Join our community here](http://www.freecodecamp.com/signin).
@@ -24,7 +24,7 @@ This code is running live at [FreeCodeCamp.com](http://www.FreeCodeCamp.com). We
Wiki
------------
-We would love your help expanding our [wiki](https://github.com/freecodecamp/freecodecamp/wiki) with more information about learning to code and getting a coding job.
+We would love your help expanding our [wiki](https://github.com/freecodecamp/freecodecamp/wiki). Our goal is to become a great resource for people learning to code, building local coding communities, and applying for coding jobs.
Contributing
------------
@@ -35,10 +35,9 @@ We welcome pull requests from Free Code Camp campers (our students) and seasoned
2. Pick an issue that nobody has claimed and start working on it. If your issue isn't on the board, open an issue. If you think you can fix it yourself, start working on it. Feel free to ask for help in our [Gitter](https://gitter.im/FreeCodeCamp/FreeCodeCamp).
3. Fork the project ([Need help with forking a project?](https://help.github.com/articles/fork-a-repo/)). You'll do all of your work on your forked copy.
4. Create a branch specific to the issue or feature you are working on. Push your work to that branch. ([Need help with branching?](https://github.com/Kunena/Kunena-Forum/wiki/Create-a-new-branch-with-git-and-manage-branches))
-5. Name the branch something like `user-xxx` where user is your username and xxx is the issue number you are addressing.
-6. You should have [ESLint running in your editor](http://eslint.org/docs/user-guide/integrations.html), and it will highlight anything doesn't conform to [AirBnB's JavaScript Style Guide](https://github.com/airbnb/javascript). Please do not ignore any linting errors, as they are meant to **help** you. Make sure none of your JavaScript is longer than 80 characters per line.
-7. Once your code is ready, submit a pull request from your branch to Free Code Camp's `staging` branch. We'll do a quick code review and give you feedback, then iterate from there.
-8. Once we accept one of your pull requests, one of the project owners (currently @quincylarson, @terakilobyte, and @berkeleytrue) will add you to our camper contributor group.
+5. 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 I fix something specific to email login.
+6. You should have [ESLint running in your editor](http://eslint.org/docs/user-guide/integrations.html), and it will highlight anything doesn't conform to [Free Code Camp's JavaScript Style Guide](https://github.com/FreeCodeCamp/FreeCodeCamp/wiki/Free-Code-Camp-JavaScript-Style-Guide) (you can find a summary of those rules [here](https://github.com/FreeCodeCamp/FreeCodeCamp/blob/staging/.eslintrc). Please do not ignore any linting errors, as they are meant to **help** you and to ensure a clean and simple code base. Make sure none of your JavaScript is longer than 80 characters per line.
+7. Once your code is ready, submit a [pull request](https://github.com/FreeCodeCamp/FreeCodeCamp/wiki/Pull-Request-Contribute) from your branch to Free Code Camp's `staging` branch. We'll do a quick code review and give you feedback, then iterate from there. It may also be helpful to read about git [rebasing](https://github.com/FreeCodeCamp/FreeCodeCamp/wiki/git-rebase).
Prerequisites
-------------
@@ -55,25 +54,28 @@ The easiest way to get started is to clone the repository:
# Get the latest snapshot
git clone --depth=1 https://github.com/freecodecamp/freecodecamp.git freecodecamp
+# Change directory
cd freecodecamp
# Install NPM dependencies
npm install
+# Install Gulp globally
+npm install -g gulp
+
+# Install Bower globally
+npm install -g bower
+
# Install Bower dependencies
bower install
# Create a .env file and populate it with the necessary API keys and secrets:
touch .env
-
-# Install Gulp globally
-npm install -g gulp
```
-Edit your .env file with the following API keys accordingly (if you only use email login, only the MONGOHQ_URL, SESSION_SECRET, MANDRILL_USER and MANDRILL_PASSWORD fields are necessary. Keep in mind if you want to use more services you'll have to get your own API keys for those services.
+Edit your `.env` file with the following API keys accordingly. If you only use email login, only the `MONGOHQ_URL`, `SESSION_SECRET`, `MANDRILL_USER` and `MANDRILL_PASSWORD` fields are necessary. Keep in mind if you want to use more services you'll have to get your own API keys for those services. If you only use a subset or no OAuth2 authentication methods, you may want to remove them from ```server/passport-providers.js``` - otherwise the server will complain about missing clientIDs at launch.
```
-
MONGOHQ_URL='mongodb://localhost:27017/freecodecamp'
FACEBOOK_ID=stuff
@@ -106,26 +108,23 @@ COOKIE_SECRET='this is a secret'
PEER=stuff
DEBUG=true
-
```
```bash
-
-# Start the mongo server
+# Start the mongo server in a seperate terminal
mongod
-# Create your mongo database.
-# Type "mongo" in your terminal to access the mongo shell
-use freecodecamp
-# Exit the mongo shell with control + d
-
-# Seed your database with the challenges
-node seed/
+# Initialize Free Code Camp
+# This will seed the database for the first time.
+# This command should only be run once.
+npm run first-time
# start the application
gulp
-
```
+Now navigate to your browser and open http://localhost:3001
+If the app loads, congratulations - you're all set. Otherwise, let us know by opening a GitHub issue and with your error.
+
License
-------
diff --git a/bower.json b/bower.json
index cd8cfd5cf3..1f833167fc 100644
--- a/bower.json
+++ b/bower.json
@@ -26,6 +26,7 @@
"moment": "~2.10.2",
"angular-bootstrap": "~0.13.0",
"ramda": "~0.13.0",
- "jshint": "~2.7.0"
+ "jshint": "~2.7.0",
+ "lightbox2": "~2.8.1"
}
}
diff --git a/client/commonFramework.js b/client/commonFramework.js
index dd91756e06..2505fe08f4 100644
--- a/client/commonFramework.js
+++ b/client/commonFramework.js
@@ -1,6 +1,158 @@
-/* globals jailed, CodeMirror, challenge_Id, challenge_Name, challengeType */
+var common = (function() {
+ // common namespace
+ // all classes should be stored here
+ var common = window.common || {
+ // init is an array of functions that are
+ // called at the beginning of dom ready
+ init: []
+ };
+
+ common.challengeName = common.challengeName || window.challenge_Name ?
+ window.challenge_Name :
+ '';
+
+ common.challengeType = common.challengeType || window.challengeType ?
+ window.challengeType :
+ 0;
+
+ common.challengeId = common.challengeId || window.challenge_Id;
+
+ common.challengeSeed = common.challengeSeed || window.challengeSeed ?
+ window.challengeSeed :
+ [];
+
+ common.seed = common.challengeSeed.reduce(function(seed, line) {
+ return seed + line + '\n';
+ }, '');
+
+ common.replaceScriptTags = function replaceScriptTags(value) {
+ return value
+ .replace(/');
+ };
+
+ common.replaceFormActionAttr = function replaceFormAction(value) {
+ return value.replace(/