Merge pull request #1 from FreeCodeCamp/staging

merging from FCC
This commit is contained in:
Sean Campbell
2015-08-29 18:18:30 -04:00
468 changed files with 8644 additions and 49366 deletions

View File

@ -19,7 +19,7 @@
"router": true "router": true
}, },
"rules": { "rules": {
"no-comma-dangle": 2, "comma-dangle": 2,
"no-cond-assign": 2, "no-cond-assign": 2,
"no-console": 0, "no-console": 0,
"no-constant-condition": 2, "no-constant-condition": 2,
@ -27,7 +27,7 @@
"no-debugger": 2, "no-debugger": 2,
"no-dupe-keys": 2, "no-dupe-keys": 2,
"no-empty": 2, "no-empty": 2,
"no-empty-class": 2, "no-empty-character-class": 2,
"no-ex-assign": 2, "no-ex-assign": 2,
"no-extra-boolean-cast": 2, "no-extra-boolean-cast": 2,
"no-extra-parens": 0, "no-extra-parens": 0,
@ -163,12 +163,11 @@
], ],
"no-nested-ternary": 2, "no-nested-ternary": 2,
"no-new-object": 2, "no-new-object": 2,
"no-space-before-semi": 2, "semi-spacing": [2, { "before": false, "after": true }],
"no-spaced-func": 2, "no-spaced-func": 2,
"no-ternary": 0, "no-ternary": 0,
"no-trailing-spaces": 1, "no-trailing-spaces": 1,
"no-underscore-dangle": 0, "no-underscore-dangle": 0,
"no-wrap-func": 2,
"one-var": 0, "one-var": 0,
"operator-assignment": 0, "operator-assignment": 0,
"padded-blocks": 0, "padded-blocks": 0,
@ -206,7 +205,7 @@
"nonwords": false "nonwords": false
} }
], ],
"spaced-line-comment": [ "spaced-comment": [
2, 2,
"always", "always",
{ "exceptions": ["-"] } { "exceptions": ["-"] }

2
.gitattributes vendored Normal file
View File

@ -0,0 +1,2 @@
public/js/lib/codemirror/* linguist-vendored
*.jsx linguist-language=JavaScript

17
.gitignore vendored
View File

@ -30,5 +30,20 @@ coverage
.remote-sync.json .remote-sync.json
server/*.bundle.js server/*.bundle.js
public/js/*.bundle.js public/js/bundle*
*.map *.map
// revision manifest
server/rev-manifest.json
server/manifests/*
!server/manifests/README.md
public/js/main*
public/js/commonFramework*
public/js/sandbox*
public/js/iFrameScripts*
public/js/plugin*
public/css/main*
server/rev-manifest.json

View File

@ -16,6 +16,7 @@
"strict": false, // Require `use strict` pragma in every file. "strict": false, // Require `use strict` pragma in every file.
"trailing": true, // Prohibit trailing whitespaces. "trailing": true, // Prohibit trailing whitespaces.
"smarttabs": false, // Suppresses warnings about mixed tabs and spaces "smarttabs": false, // Suppresses warnings about mixed tabs and spaces
"esnext": true, // Allow ES6 maybe :p
"globals": { // Globals variables. "globals": { // Globals variables.
"jasmine": true, "jasmine": true,
"angular": true, "angular": true,
@ -37,4 +38,4 @@
], ],
"devel": true, // Allow development statements e.g. `console.log();`. "devel": true, // Allow development statements e.g. `console.log();`.
"noempty": true // Prohibit use of empty blocks. "noempty": true // Prohibit use of empty blocks.
} }

2
CONTRIBUTING.md Normal file
View File

@ -0,0 +1,2 @@
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.

View File

@ -16,7 +16,7 @@ With respect to the computer software contained in this repository:
# Curricular Content # Curricular Content
With respect to the curricular content contained in this repository, as in the `./seed/challenges` and subdirectory and our wiki: With respect to the curricular content contained in this repository, as in the `./seed/challenges` and subdirectories and our wiki:
> By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution-ShareAlike 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions. > By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution-ShareAlike 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions.
> >

View File

@ -66,6 +66,8 @@ bower install
# Create a .env file and populate it with the necessary API keys and secrets: # Create a .env file and populate it with the necessary API keys and secrets:
touch .env 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.
@ -98,7 +100,6 @@ TWITTER_TOKEN=stuff
TWITTER_TOKEN_SECRET=stuff TWITTER_TOKEN_SECRET=stuff
BLOGGER_KEY=stuff BLOGGER_KEY=stuff
SLACK_WEBHOOK=stuff
SESSION_SECRET=secretstuff SESSION_SECRET=secretstuff
COOKIE_SECRET='this is a secret' COOKIE_SECRET='this is a secret'
@ -113,6 +114,11 @@ DEBUG=true
# Start the mongo server # Start the mongo server
mongod 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 # Seed your database with the challenges
node seed/ node seed/
@ -121,78 +127,6 @@ gulp
``` ```
Project Structure
-----------------
| Name | Description |
| ---------------------------------- |:-----------------------------------------------------------:|
| **config**/passport.js | Passport Local and OAuth strategies, plus login middleware. |
| **config**/secrets.js | Your API keys, tokens, passwords and database URL. |
| **controllers**/contact.js | Controller for contact form. |
| **controllers**/home.js | Controller for home page (index). |
| **controllers**/user.js | Controller for user account management. |
| **controllers**/challenges.js | Controller for rendering the challenges. |
| **models**/user.json | Mongoose schema and model for User. |
| **models**/challenge.json | Mongoose schema and model for Challenge. |
| **public**/ | Static assets (fonts, css, js, img). |
| **public**/**js**/application.js | Specify client-side JavaScript dependencies. |
| **public**/**js**/main_0.0.2.js | Place your client-side JavaScript here. |
| **public**/**css**/main.less | Main stylesheet for the app. |
| **views/account**/ | Templates for *login, password reset, signup, profile*. |
| **views/partials**/flash.jade | Error, info and success flash notifications. |
| **views/partials**/navigation.jade | Navbar partial template. |
| **views/partials**/footer.jade | Footer partial template. |
| **views**/layout.jade | Base template. |
| **views**/home.jade | Home page template. |
| server.js | Main application file. |
List of Packages
----------------
| Package | Description |
| ------------------------------- |:--------------------------------------------------------------------:|
| async | Utility library that provides asynchronous control flow. |
| bcrypt-nodejs | Library for hashing and salting user passwords. |
| cheerio | Scrape web pages using jQuery-style syntax. |
| clockwork | Clockwork SMS API library. |
| connect-assets | Compiles LESS stylesheets, concatenates & minifies JavaScript. |
| connect-mongo | MongoDB session store for Express. |
| csso | Dependency for connect-assets library to minify CSS. |
| express | Node.js web framework. |
| body-parser | Express 4.0 middleware. |
| cookie-parser | Express 4.0 middleware. |
| express-session | Express 4.0 middleware. |
| morgan | Express 4.0 middleware. |
| compression | Express 4.0 middleware. |
| errorhandler | Express 4.0 middleware. |
| method-override | Express 4.0 middleware. |
| express-flash | Provides flash messages for Express. |
| express-validator | Easy form validation for Express. |
| fbgraph | Facebook Graph API library. |
| github-api | GitHub API library. |
| jade | Template engine for Express. |
| less | LESS compiler. Used implicitly by connect-assets. |
| helmet | Restricts Cross site requests. You can modify its settings in server.js |
| mongoose | MongoDB ODM. |
| nodemailer | Node.js library for sending emails. |
| passport | Simple and elegant authentication library for node.js |
| passport-facebook | Sign-in with Facebook plugin. |
| passport-github | Sign-in with GitHub plugin. |
| passport-google-oauth | Sign-in with Google plugin. |
| passport-twitter | Sign-in with Twitter plugin. |
| passport-local | Sign-in with Username and Password plugin. |
| passport-linkedin-oauth2 | Sign-in with LinkedIn plugin. |
| passport-oauth | Allows you to set up your own OAuth 1.0a and OAuth 2.0 strategies. |
| request | Simplified HTTP request library. |
| lodash | Handy JavaScript utilities library. |
| uglify-js | Dependency for connect-assets library to minify JS. |
| mocha | Test framework. |
| chai | BDD/TDD assertion library. |
| supertest | HTTP assertion library. |
| multiline | Multi-line strings for the generator. |
License License
------- -------

View File

@ -1,4 +1,4 @@
This is the entry point for the client This is the entry point for the client code
Code that should only run on the client should be put here. Code that should only run on the client should be put here.
NOTE(berks): For react specific stuff this should be the entry point NOTE(berks): For react specific stuff this should be the entry point

768
client/commonFramework.js Normal file

File diff suppressed because one or more lines are too long

View File

@ -16,7 +16,7 @@ const services = new Fetchr({
xhrPath: '/services' xhrPath: '/services'
}); });
Rx.longStackSupport = !!debug.enabled; Rx.config.longStackSupport = !!debug.enabled;
// returns an observable // returns an observable
app$(history) app$(history)

View File

Before

Width:  |  Height:  |  Size: 306 KiB

After

Width:  |  Height:  |  Size: 306 KiB

Some files were not shown because too many files have changed in this diff Show More