You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+29-33
Original file line number
Diff line number
Diff line change
@@ -17,44 +17,46 @@ npm install -g @coderoad/cli
17
17
18
18
## Create
19
19
20
+
Create templates files for building a new tutorial.
21
+
20
22
```shell
21
23
coderoad create
22
24
```
23
25
24
-
Create templates files in the current folder for the content and setup files.
26
+
Templates for specific coding languages to come.
25
27
26
28
## Build
27
29
28
-
```text
29
-
$ coderoad build [options]
30
-
31
-
options:
30
+
Build the configuration file to be used by the extension to run the tutorial.
32
31
33
-
-g, --git Tutorial's remote git address. Either --git or --dir should be provided.
34
-
-d, --dir Tutorial's local directory. Either --git or --dir should be provided.
35
-
-c, --code Branch that contains the code.
36
-
-s, --setup Branch that contains the TUTORIAL.md and coderoad.yaml files.
37
-
-o, --output (Optional) Save the configuration in the output file.
38
-
Log into the console if not set
39
-
-h, --help (Optional) Show the help message
32
+
```shell
33
+
coderoad build
40
34
```
41
35
42
-
Build the configuration file to be used by the extension to run the tutorial. The configuration file is created by matching the `level` and `step` ids between the `TUTORIAL.md` and `coderoad.yaml` files against git commit messages with the same ids. For example:
36
+
Defaults assume:
37
+
38
+
- a `TUTORIAL.md` markdown file (change with `--markdown OTHER.md`)
39
+
- a `coderoad.yaml` file (change with `--yaml other.yaml`)
40
+
- an output file of `tutorial.json` (change with `--output other.json`)
41
+
42
+
The configuration file is created by matching the `level` and `step` ids between the `TUTORIAL.md` and `coderoad.yaml` files against git commit messages with the same ids. For example:
43
43
44
44
**TUTORIAL.md**
45
45
46
46
```markdown
47
-
...
47
+
# Tutorial Title
48
48
49
-
## L10 This is a level with id = 10
49
+
Tutorial description.
50
+
51
+
## L1 This is a level with id = 1
50
52
51
53
This level has two steps...
52
54
53
-
### L10S1 First step
55
+
### L1S1 First step
54
56
55
-
The first step with id L10S1. The Step id should start with the level id.
57
+
The first step with id L1S1. The Step id should start with the level id.
Note that the step `L10S2` has two commits, one with the suffix `Q` and another one with `A`. The suffixes mean `Question` and `Answer`, respectively.
122
-
123
-
Steps defined as questions are **required** as they are meant to set the task to be executed by the student. The answer is optional and should be used when a commit must be loaded to verify the student's solution. If there is no need to load commits for `A` steps, the `commits` key should be removed from the `coderoad.yaml` file for that step.
119
+
Note that the step `L1S2` has two commits, one with the suffix `Q` and another one with `A`. The suffixes mean `Question` and `Answer`, respectively, and refer to the unit tests and the commit that makes them pass.
124
120
125
-
**IMPORTANT**
121
+
Steps defined as questions are **required** as they are meant to set the task to be executed by the student. The answer is optional and should be used when a commit must be loaded to verify the student's solution.
126
122
127
-
Only the most recent commit is evaluated for each level/step id.
123
+
If there are multiple commits for a level or step, they are captured in order.
0 commit comments