Skip to content

Commit

Permalink
breaking(3.0.0): configuration (#413)
Browse files Browse the repository at this point in the history
* breaking(3.0.0): configuration

* fix: remove mention of node-fetch

* remove schema, update license, debug console url checker

* update changelog
  • Loading branch information
ShaunSHamilton authored Feb 1, 2024
1 parent 1f0b842 commit 2a1ff87
Show file tree
Hide file tree
Showing 18 changed files with 178 additions and 757 deletions.
26 changes: 24 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,32 @@ All notable changes to the `freecodecamp-courses` extension will be documented i

Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file.

## [Unreleased]

## [Released]

##[3.0.0](#v3.0.0) (2024-02-01)

### Changed

- `activationEvents`:
- `"workspaceContains:**/freecodecamp.conf.json"` to `"onStartupFinished"`

### Added

- Configuration settings in package.json:
- `"freecodecamp-courses.autoStart"`: Automatically start the course when opened in VS Code (boolean, default: false)
- `"freecodecamp-courses.path"`: Relative path to the directory where scripts will be run (string, default: ".")
- `"freecodecamp-courses.prepare"`: Command to run on the first opening of a course (string, default: "npm install")
- `"freecodecamp-courses.scripts.develop-course"`: Command to run when developing a course (string, default: "npm run develop")
- `"freecodecamp-courses.scripts.run-course"`: Command to run when running a course in production (string, default: "npm run start")
- `"freecodecamp-courses.workspace.files"`: Files to open in the workspace when opening a course (array of objects with "path" property)
- `"freecodecamp-courses.workspace.previews"`: Previews to open in the workspace when opening a course (array of objects with "open", "showLoader", "url", and "timeout" properties)
- `"freecodecamp-courses.workspace.terminals"`: Terminals to open in the workspace when opening a course (array of objects with "directory", "message", "name", and "show" properties)

### Removed

- Removed the `create-new-course.ts` file and related command registration from extension.ts.
- Delete `schema.json` for `freecodecamp.conf.json`

##[2.1.0](#v2.1.0) (2024-01-18)

### Added
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BSD 3-Clause License

Copyright (c) 2019-2023, freeCodeCamp.org
Copyright (c) 2019-2024, freeCodeCamp.org
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,3 @@ This extension helps run the freeCodeCamp courses found here: [./resources/cours
## Creating a Course

See https://opensource.freecodecamp.org/freeCodeCampOS/

### Basic Config File

See up-to-date example here: [./src/fixture.ts](src/fixture.ts)
91 changes: 2 additions & 89 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

125 changes: 111 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"activationEvents": [
"workspaceContains:**/freecodecamp.conf.json"
"onStartupFinished"
],
"author": "freeCodeCamp",
"bugs": {
Expand All @@ -15,10 +15,6 @@
"command": "freecodecamp-courses.openCourse",
"title": "freeCodeCamp: Open Course"
},
{
"command": "freecodecamp-courses.createNewCourse",
"title": "freeCodeCamp: Create New Course"
},
{
"command": "freecodecamp-courses.runCourse",
"title": "freeCodeCamp: Run Course"
Expand All @@ -36,15 +32,116 @@
"title": "freeCodeCamp: Shutdown Course"
}
],
"jsonValidation": [
{
"fileMatch": "**/freecodecamp.conf.json",
"url": "./schema.json"
"configuration": {
"title": "freeCodeCamp - Courses",
"properties": {
"freecodecamp-courses.autoStart": {
"type": "boolean",
"default": false,
"description": "Automatically start the course when opened in VS Code"
},
"freecodecamp-courses.path": {
"type": "string",
"default": ".",
"description": "Relative path to directory where scripts will be run"
},
"freecodecamp-courses.prepare": {
"type": "string",
"default": "npm install",
"description": "Command to run on first opening a course"
},
"freecodecamp-courses.scripts.develop-course": {
"type": "string",
"default": "npm run develop",
"description": "Command to run when developing a course"
},
"freecodecamp-courses.scripts.run-course": {
"type": "string",
"default": "npm run start",
"description": "Command to run when running a course in production"
},
"freecodecamp-courses.workspace.files": {
"type": "array",
"default": [],
"description": "Files to open in the workspace when opening a course",
"items": {
"type": "object",
"properties": {
"path": {
"type": "string",
"description": "Relative path to file"
}
}
}
},
"freecodecamp-courses.workspace.previews": {
"type": "array",
"default": [
{
"open": true,
"showLoader": true,
"url": "http://localhost:8080",
"timeout": 4000
}
],
"description": "Previews to open in the workspace when opening a course",
"items": {
"type": "object",
"properties": {
"open": {
"type": "boolean",
"default": true,
"description": "Whether to open the preview"
},
"showLoader": {
"type": "boolean",
"default": true,
"description": "Whether to show the loading screen"
},
"url": {
"type": "string",
"description": "URL to open in the preview"
},
"timeout": {
"type": "number",
"default": 4000,
"description": "Timeout for URL to respond with 200"
}
}
}
},
"freecodecamp-courses.workspace.terminals": {
"type": "array",
"default": [],
"items": {
"type": "object",
"properties": {
"directory": {
"type": "string",
"description": "Relative path to directory where scripts will be run"
},
"message": {
"type": [
"string",
"null"
],
"default": null,
"description": "Message to display in terminal"
},
"name": {
"type": "string",
"description": "Name of terminal"
},
"show": {
"type": "boolean",
"description": "Whether to show the terminal"
}
}
},
"description": "Terminals to open in the workspace when opening a course"
}
}
]
},
"dependencies": {
"node-fetch": "3.3.2"
}
},
"description": "Provides tooling for quick and easy selection of courses offered by freeCodeCamp",
"devDependencies": {
Expand Down Expand Up @@ -96,5 +193,5 @@
"vscode:prepublish": "npm run package",
"watch": "webpack --watch"
},
"version": "2.1.0"
"version": "3.0.0"
}
Loading

0 comments on commit 2a1ff87

Please sign in to comment.