Configuration
freecodecamp.conf.json
Required Configuration
{
"version": "0.0.1",
"config": {
"projects.json": "<PROJECTS_JSON>",
"state.json": "<STATE_JSON>"
},
"curriculum": {
"locales": {
"<LOCALE>": "<LOCALE_DIR>"
}
}
}
Minimum Usable Example
{
"version": "0.0.1",
"config": {
"projects.json": "./config/projects.json",
"state.json": "./config/state.json"
},
"curriculum": {
"locales": {
"english": "./curriculum/locales/english"
}
}
}
Optional Configuration (Features)
port
By default, the server and client communicate over port 8080
. To change this, add a port
key to the configuration file:
client
assets.header
: path relative to the root of the course -string
assets.favicon
: path relative to the root of the course -string
landing.<locale>.description
: description of the course shown on the landing page -string
landing.<locale>.title
: title of the course shown on the landing page -string
landing.<locale>.faq-link
: link to the FAQ page -string
landing.<locale>.faq-text
: text to display for the FAQ link -string
static
: static resources to serve -string | string[] | Record<string, string> | Record<string, string>[]
{
"client": {
"assets": {
"header": "./client/assets/header.png",
"favicon": "./client/assets/favicon.ico"
},
"static": ["./curriculum/", { "/images": "./curriculum/images" }]
}
}
config
projects.json
: path relative to the root of the course -string
state.json
: path relative to the root of the course -string
{
"config": {
"projects.json": "./config/projects.json",
"state.json": "./config/state.json"
}
}
curriculum
locales
: an object of locale names and their corresponding paths relative to the root of the course -Record<string, string>
assertions
: an onject of locale names and their corresponding paths to a JSON file containing custom assertions -string
{
"curriculum": {
"locales": {
"english": "./curriculum/locales/english"
},
"assertions": {
"afrikaans": "./curriculum/assertions/afrikaans.json"
}
}
}
hotReload
ignore
: a list of paths to ignore when hot reloading -string[]
tooling
helpers
: path relative to the root of the course -string
plugins
: path relative to the root of the course -string
projects.json
Definitions
id
: A unique, incremental integer -number
dashedName
: The name of the project corresponding to thecurriculum/locales/<PROJECT_DASHED_NAME>.md
file -string
isIntegrated
: Whether or not to treat the project as a single-lesson project -boolean
(default:false
)isPublic
: Whether or not to enable the project for public viewing. Note: the project will still be visible on the landing page, but will be disabled -boolean
(default:false
)currentLesson
: The current lesson of the project -number
(default:1
)runTestsOnWatch
: Whether or not to run tests on file change -boolean
(default:false
)isResetEnabled
: Whether or not to enable the reset button -boolean
(default:false
)numberOfLessons
: The number of lessons in the project -number
1seedEveryLesson
: Whether or not to run the seed on lesson load -boolean
(default:false
)blockingTests
: Run tests synchronously -boolean
(default:false
)breakOnFailure
: Stop running tests on the first failure -boolean
(default:false
)
1
This is automagically calculated when the app is launched.
Required Configuration
[
{
"id": 0, // Unique ID
"dashedName": "<PROJECT_DASHED_NAME>"
}
]
Optional Configuration
[
{
"id": 0,
"dashedName": "learn-x-by-building-y",
"isIntegrated": false,
"isPublic": false,
"currentLesson": 1,
"runTestsOnWatch": false,
"isResetEnabled": false,
"numberOfLessons": 10,
"seedEveryLesson": false,
"blockingTests": false,
"breakOnFailure": false
}
]