Skip to content

Commit 2a1ff87

Browse files
breaking(3.0.0): configuration (#413)
* breaking(3.0.0): configuration * fix: remove mention of node-fetch * remove schema, update license, debug console url checker * update changelog
1 parent 1f0b842 commit 2a1ff87

18 files changed

+178
-757
lines changed

CHANGELOG.md

+24-2
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,32 @@ All notable changes to the `freecodecamp-courses` extension will be documented i
44

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

7-
## [Unreleased]
8-
97
## [Released]
108

9+
##[3.0.0](#v3.0.0) (2024-02-01)
10+
11+
### Changed
12+
13+
- `activationEvents`:
14+
- `"workspaceContains:**/freecodecamp.conf.json"` to `"onStartupFinished"`
15+
16+
### Added
17+
18+
- Configuration settings in package.json:
19+
- `"freecodecamp-courses.autoStart"`: Automatically start the course when opened in VS Code (boolean, default: false)
20+
- `"freecodecamp-courses.path"`: Relative path to the directory where scripts will be run (string, default: ".")
21+
- `"freecodecamp-courses.prepare"`: Command to run on the first opening of a course (string, default: "npm install")
22+
- `"freecodecamp-courses.scripts.develop-course"`: Command to run when developing a course (string, default: "npm run develop")
23+
- `"freecodecamp-courses.scripts.run-course"`: Command to run when running a course in production (string, default: "npm run start")
24+
- `"freecodecamp-courses.workspace.files"`: Files to open in the workspace when opening a course (array of objects with "path" property)
25+
- `"freecodecamp-courses.workspace.previews"`: Previews to open in the workspace when opening a course (array of objects with "open", "showLoader", "url", and "timeout" properties)
26+
- `"freecodecamp-courses.workspace.terminals"`: Terminals to open in the workspace when opening a course (array of objects with "directory", "message", "name", and "show" properties)
27+
28+
### Removed
29+
30+
- Removed the `create-new-course.ts` file and related command registration from extension.ts.
31+
- Delete `schema.json` for `freecodecamp.conf.json`
32+
1133
##[2.1.0](#v2.1.0) (2024-01-18)
1234

1335
### Added

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
BSD 3-Clause License
22

3-
Copyright (c) 2019-2023, freeCodeCamp.org
3+
Copyright (c) 2019-2024, freeCodeCamp.org
44
All rights reserved.
55

66
Redistribution and use in source and binary forms, with or without

README.md

-4
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,3 @@ This extension helps run the freeCodeCamp courses found here: [./resources/cours
3131
## Creating a Course
3232

3333
See https://opensource.freecodecamp.org/freeCodeCampOS/
34-
35-
### Basic Config File
36-
37-
See up-to-date example here: [./src/fixture.ts](src/fixture.ts)

package-lock.json

+2-89
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+111-14
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"activationEvents": [
3-
"workspaceContains:**/freecodecamp.conf.json"
3+
"onStartupFinished"
44
],
55
"author": "freeCodeCamp",
66
"bugs": {
@@ -15,10 +15,6 @@
1515
"command": "freecodecamp-courses.openCourse",
1616
"title": "freeCodeCamp: Open Course"
1717
},
18-
{
19-
"command": "freecodecamp-courses.createNewCourse",
20-
"title": "freeCodeCamp: Create New Course"
21-
},
2218
{
2319
"command": "freecodecamp-courses.runCourse",
2420
"title": "freeCodeCamp: Run Course"
@@ -36,15 +32,116 @@
3632
"title": "freeCodeCamp: Shutdown Course"
3733
}
3834
],
39-
"jsonValidation": [
40-
{
41-
"fileMatch": "**/freecodecamp.conf.json",
42-
"url": "./schema.json"
35+
"configuration": {
36+
"title": "freeCodeCamp - Courses",
37+
"properties": {
38+
"freecodecamp-courses.autoStart": {
39+
"type": "boolean",
40+
"default": false,
41+
"description": "Automatically start the course when opened in VS Code"
42+
},
43+
"freecodecamp-courses.path": {
44+
"type": "string",
45+
"default": ".",
46+
"description": "Relative path to directory where scripts will be run"
47+
},
48+
"freecodecamp-courses.prepare": {
49+
"type": "string",
50+
"default": "npm install",
51+
"description": "Command to run on first opening a course"
52+
},
53+
"freecodecamp-courses.scripts.develop-course": {
54+
"type": "string",
55+
"default": "npm run develop",
56+
"description": "Command to run when developing a course"
57+
},
58+
"freecodecamp-courses.scripts.run-course": {
59+
"type": "string",
60+
"default": "npm run start",
61+
"description": "Command to run when running a course in production"
62+
},
63+
"freecodecamp-courses.workspace.files": {
64+
"type": "array",
65+
"default": [],
66+
"description": "Files to open in the workspace when opening a course",
67+
"items": {
68+
"type": "object",
69+
"properties": {
70+
"path": {
71+
"type": "string",
72+
"description": "Relative path to file"
73+
}
74+
}
75+
}
76+
},
77+
"freecodecamp-courses.workspace.previews": {
78+
"type": "array",
79+
"default": [
80+
{
81+
"open": true,
82+
"showLoader": true,
83+
"url": "http://localhost:8080",
84+
"timeout": 4000
85+
}
86+
],
87+
"description": "Previews to open in the workspace when opening a course",
88+
"items": {
89+
"type": "object",
90+
"properties": {
91+
"open": {
92+
"type": "boolean",
93+
"default": true,
94+
"description": "Whether to open the preview"
95+
},
96+
"showLoader": {
97+
"type": "boolean",
98+
"default": true,
99+
"description": "Whether to show the loading screen"
100+
},
101+
"url": {
102+
"type": "string",
103+
"description": "URL to open in the preview"
104+
},
105+
"timeout": {
106+
"type": "number",
107+
"default": 4000,
108+
"description": "Timeout for URL to respond with 200"
109+
}
110+
}
111+
}
112+
},
113+
"freecodecamp-courses.workspace.terminals": {
114+
"type": "array",
115+
"default": [],
116+
"items": {
117+
"type": "object",
118+
"properties": {
119+
"directory": {
120+
"type": "string",
121+
"description": "Relative path to directory where scripts will be run"
122+
},
123+
"message": {
124+
"type": [
125+
"string",
126+
"null"
127+
],
128+
"default": null,
129+
"description": "Message to display in terminal"
130+
},
131+
"name": {
132+
"type": "string",
133+
"description": "Name of terminal"
134+
},
135+
"show": {
136+
"type": "boolean",
137+
"description": "Whether to show the terminal"
138+
}
139+
}
140+
},
141+
"description": "Terminals to open in the workspace when opening a course"
142+
}
43143
}
44-
]
45-
},
46-
"dependencies": {
47-
"node-fetch": "3.3.2"
144+
}
48145
},
49146
"description": "Provides tooling for quick and easy selection of courses offered by freeCodeCamp",
50147
"devDependencies": {
@@ -96,5 +193,5 @@
96193
"vscode:prepublish": "npm run package",
97194
"watch": "webpack --watch"
98195
},
99-
"version": "2.1.0"
196+
"version": "3.0.0"
100197
}

0 commit comments

Comments
 (0)