Skip to content

Commit 95caf14

Browse files
committed
Add more text and fix typos
1 parent aa57016 commit 95caf14

File tree

1 file changed

+89
-5
lines changed

1 file changed

+89
-5
lines changed

README.md

Lines changed: 89 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ Command line interface for [CodeRoad](https://marketplace.visualstudio.com/items
99

1010
## Install
1111

12-
Use CodeRoad CLI to setup and build a tutorial configuration file.
12+
Use CodeRoad CLI to set up and build a tutorial configuration file.
1313

1414
```shell
1515
npm install -g coderoad-cli
1616
```
1717

18-
## Craete
18+
## Create
1919

2020
```shell
2121
$ coderoad create
@@ -31,13 +31,97 @@ $ coderoad build [options]
3131
3232
options:
3333
34-
-g, --git Tutorial's remote git address. Either --git ot --dir should be provided.
35-
-d, --dir Tutorial's local directory. Either --git ot --dir should be provided.
34+
-g, --git Tutorial's remote git address. Either --git or --dir should be provided.
35+
-d, --dir Tutorial's local directory. Either --git or --dir should be provided.
3636
-c, --code Branch that contains the code.
3737
-s, --setup Branch that contains the TUTORIAL.md and coderoad.yaml files.
3838
-o, --output (Optional) Save the configuration in the output file.
3939
Log into the console if not set
4040
-h, --help (Optional) Show the help message
4141
```
4242

43-
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.
43+
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:
44+
45+
46+
**TUTORIAL.md**
47+
```markdown
48+
...
49+
## L10 This is a level with id = 10
50+
51+
This level has two steps...
52+
53+
54+
### L10S1 First step
55+
56+
The first step with id L10S1. The Step id should start with the level id.
57+
58+
### L10S2 The second step
59+
60+
The second step...
61+
```
62+
63+
**coderoad.yaml**
64+
```yaml
65+
...
66+
levels:
67+
- id: L10
68+
config: {}
69+
steps:
70+
- id: L10S1
71+
setup:
72+
files:
73+
- package.json
74+
commits: []
75+
watchers:
76+
- package.json
77+
- node_modules/express
78+
commands:
79+
- npm install
80+
solution:
81+
files:
82+
- package.json
83+
commits: []
84+
commands:
85+
- npm install
86+
- id: L10S2
87+
setup:
88+
files:
89+
- src/server.js
90+
commits: []
91+
commands:
92+
- npm install
93+
solution:
94+
files:
95+
- src/server.js
96+
commits: []
97+
```
98+
99+
... and the commit messages
100+
101+
```
102+
commit 8e0e3a42ae565050181fdb68298114df21467a74 (HEAD -> v2, origin/v2)
103+
Author: creator <author@email.com>
104+
Date: Sun May 3 16:16:01 2020 -0700
105+
106+
L10S1Q setup step 1 for level 2
107+
108+
commit 9499611fc9b311040dcabaf2d98439fc0c356cc9
109+
Author: creator <author@email.com>
110+
Date: Sun May 3 16:13:37 2020 -0700
111+
112+
L10S2A checkout solution for Level 1, step 2
113+
114+
commit c5c62041282579b495d3589b2eb1fdda2bcd7155
115+
Author: creator <author@email.com>
116+
Date: Sun May 3 16:11:42 2020 -0700
117+
118+
L10S2Q setup level 1, step 2
119+
```
120+
121+
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.
124+
125+
**IMPORTANT**
126+
127+
Only the most recent commit is evaluated for each level/step id.

0 commit comments

Comments
 (0)