freeCodeCamp/seed
Paul Rail 1d9eca3700 fix(seed): Correct typos in es6.json (#16972) 2018-03-28 20:01:52 +05:30
..
challenges fix(seed): Correct typos in es6.json (#16972) 2018-03-28 20:01:52 +05:30
math-challenges fix(seed): Remove redundant seed files from math directory 2017-09-09 10:52:12 -05:00
LICENSE.md docs(license): Update License fix for GitHub (#16113) 2017-11-25 11:47:27 -06:00
README.md docs(seed): Document how to edit and test challenges (#16511) 2018-01-20 22:00:21 +05:30
bonfireMDNlinks.js Fix: Add MDN Strict Inequality Link 2016-11-27 19:30:07 -05:00
challenge-style-guide.md docs(seed): Document how to edit and test challenges (#16511) 2018-01-20 22:00:21 +05:30
create-challenge-bundle.js
get-challenge-completion.js Fixes invalid JSON format data exporting 2016-01-11 02:39:15 +04:00
get-emails.js
getChallenges.js docs(seed): Added Guide for contributing project euler (#16140) 2017-12-05 00:41:25 -06:00
index.js feat(settings): Expand Settings page functionality (#16664) 2018-02-16 17:18:53 -06:00
loopbackMigration.js change node-uuid to uuid 2016-12-30 16:47:09 -06:00
normalize-seed-files.js feature(translations): Normalize translations 2016-07-28 23:40:01 -07:00
test-challenges.js Validate ObjectId on test (#16579) 2018-01-29 10:11:27 -06:00

README.md

Challenges

The seed directory contains all the challenges that appear on the freeCodeCamp learning platform.

For each challenge section, there is a JSON file (fields documented below) containing its name, seed HTML, tests, and so on.

Usage

command description
npm run test-challenges run all challenge tests (for each challenge JSON file, run all tests against all solutions)
npm run test run all JS tests in the system, including client, server, lint and challenge tests
node seed parses all the challenge JSON files and saves them into MongoDB (code is inside index.js)
npm run commit interactive tool to help you build a good commit message

Challenge Template

{
  "id": "unique identifier (alphanumerical, mongodb id)",
  "title": "Challenge Title",
  "description": [
    "Challenge description.",
    "An new string in the array will create a new paragraph."
  ],
  "releasedOn": "date formatted like: January 1, 2016",
  "challengeSeed": [
    "// code displayed in the editor by default",
    "// a new string in the array is a new line"
  ],
  "solutions": [
    "at least one code solution that passes the tests below, used for automated testing (and inspiration for students)."
  ],
  "tests": [
    "an array of assert tests that check if the user's solution is working",
    "assert(aFunction('argument') === 'result', 'message: This message explains what the test is testing');",
  ],
  "type": "string identifying type of challenge. takes priority for viewType",
  "challengeType": "number identifying type of challenge (step, project, normal). takes priority for submitType",
  "isRequired": "boolean value that indicates whether challenge is required for certificate",
  "translations": {
    "language-code": {
      "title": "The Title in a Different Language",
      "description": [
        "The description in a different language."
      ]
    }
  }
},