ojeytonwilliams / external-project

Test repo for external freeCodeCamp courses

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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 to false
  • CURRENT_PROJECT - must match /tooling/locales/en/<project_name>.md filename
  • LAST_KNOWN_LESSON_WITH_HASH - legacy, but left in case we want a Git-saving workflow
  • TEST_POLLING_RATE - how often to refresh for changes in ms
  • LOCALE - one of /tooling/locales/conf.js - defaults to english

How To Run the Course

In Gitpod!

  1. Ensure you have the Gitpod extension. Otherwise click here
  2. Once Gitpod opens, ensure it is done doing its stuffs
  3. 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

  1. Create an empty directory:
mkdir course
cd course
  1. 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
  1. Open VSCode
code .
  1. Ctrl + Shift + P and select freeCodeCamp: Open Course

  2. Choose the course you want to run

  3. Ctrl + Shift + P and select Remote-Containers: Rebuild and Reopen in Container

  4. Ctrl + Shift + P and select freeCodeCamp: Run Course

Ideal Dev Setup

  1. Create an empty directory:
mkdir course
cd course
  1. 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
  1. Open VSCode
code .

4 Ctrl + Shift + P -> freeCodeCam: Develop New Course

  1. 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

Adding the Course to the freeCodeCamp Courses Extension

  1. Go to the freeCodeCamp/freecodecamp-course repo
  2. 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)

About

Test repo for external freeCodeCamp courses


Languages

Language:JavaScript 63.4%Language:Shell 15.2%Language:CSS 11.7%Language:Dockerfile 5.9%Language:HTML 3.8%