freeCodeCamp - External Project Template
Shaun is having fun testing a minimal way to run courses locally.
Shaun's TODO:
- Refactor tooling/file names and structure to something that makes sense
- Add workflow for translations to Crowdin
- Fix
package.json
issue with script$PWD
in.bashrc
-
Go to Next Lesson
button? - Enable seed parsing for resetting
- Feature flag for seed to always use seed on next lesson?
Main Features
- Dockerised setup for consistency
- Familiar Markdown syntax for lessons
- Quick and simple Gitpod setup for testing/developing
- Testing can be done with any valid Nodejs
- freeCodeCamp-stylised preview for instruction delivery
Feature Flags
RUN_TESTS_ON_WATCH
- whether or not to run the tests on every input/save/change - defaults tofalse
CURRENT_PROJECT
- must match/tooling/locales/en/<project_name>.md
filenameLAST_KNOWN_LESSON_WITH_HASH
- legacy, but left in case we want a Git-saving workflowTEST_POLLING_RATE
- how often to refresh for changes inms
LOCALE
- one of/tooling/locales/conf.js
- defaults toenglish
How To Run the Course
In Gitpod!
- Ensure you have the Gitpod extension. Otherwise click here
- Once Gitpod opens, ensure it is done doing its stuffs
- Open Command Palette, run
freeCodeCamp: Develop Course
Notes
- When doing the course, ensure you are in the
curriculum/
directory - The preview window is forced to refresh quite often - it might look like it is flickering
Locally
- Create an empty directory:
mkdir course
cd course
- Download/Install
freeCodeCamp Courses
extension in VSCode.
wget https://github.com/ShaunSHamilton/courses-plus/raw/main/freecodecamp-courses-patch.vsix
code --install-extension freecodecamp-courses-patch.vsix
- Open VSCode
code .
-
Ctrl + Shift + P
and selectfreeCodeCamp: Open Course
-
Choose the course you want to run
-
Ctrl + Shift + P
and selectRemote-Containers: Rebuild and Reopen in Container
-
Ctrl + Shift + P
and selectfreeCodeCamp: Run Course
Ideal Dev Setup
- Create an empty directory:
mkdir course
cd course
- Download/Install
freeCodeCamp Courses
extension in VSCode.
wget https://github.com/ShaunSHamilton/courses-plus/raw/main/freecodecamp-courses-patch.vsix
code --install-extension freecodecamp-courses-patch.vsix
- Open VSCode
code .
4 Ctrl + Shift + P
-> freeCodeCam: Develop New Course
- Follow development steps in Creating a Course
Creating a Course (In Progress)
General Information
- You should not need to make any changes other than to the following files:
.freeCodeCamp/tooling/locales/english/project-1.md
- Edit this
README.md
to include information about the course
freeCodeCamp Courses
Extension
Adding the Course to the - Go to the freeCodeCamp/freecodecamp-course repo
- Open a PR adding to the resources/courses.json file.
Markdown Syntax
Headers
## <number>
- Lesson number heading (required)### --description--
- Lesson description (required)### --tests--
- Tests for lesson (required)### --seed--
- Seed for lesson (optional)#### --cmd--
- Command for lesson seed (Camper will see) (optional)#### --cmd-hidden--
- Command for lesson seed (Hidden from Camper) (optional)#### --"<string>"--
- File name and seed heading (optional)
Example
## 1
### --description--
Teach Campers amazing things here...
### --tests--
At least one line as a hint in the tests
```js
assert("Chai.js tests with async code");
```
### --seed--
#### --cmd--
```bash
cd somewhere
```
#### --cmd-hidden--
```bash
echo Campers should not see this
```
#### --"somewhere/index.rs"--
```rust
let seed_for_file = "I am what the 'somewhere/index.rs' file should start with'";
```
#### --cmd--
```bash
echo "All seed is run in order"
```
## 2
Notables
- Below is the template for the course README
freeCodeCamp -
Course Desciption
Add a description of the course here. Example:
This course will introduce you to the Rust programming language.
Prerequisites
- Intermediate knowledge of at least one other programming language
- Basic knowledge of Bash
Learning Outcomes
- Variables
- Primitives
- Typing
- Ownership
- Handling Environment Arguments
- Parsing Strings into Floats
- Functions
- Structs
- Tuples
- Enums
- Vecs
- Control Flow
- Testing
- Traits
- Decoding Images
- Building
- Error Handling
How to Get Started
Instructions for how to run the course on different platforms (e.g. Locally, Gitpod, Replit)