Skip to content

Commit 59c0b3e

Browse files
committed
Move main README to cli
1 parent 00314ad commit 59c0b3e

1 file changed

Lines changed: 2 additions & 76 deletions

File tree

README.md

Lines changed: 2 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -12,82 +12,8 @@ steps:
1212

1313
- uses: cratecode/upload-manifest@v1
1414
with:
15-
manifest: path/to/manifest
15+
manifest: path/to/manifest.json
1616
key: ${{ secrets.CRATECODE_API_KEY }}
1717
```
1818
19-
# Usage
20-
21-
Uploading works by creating a manifest file which imports other manifest files, and can also specify a unit to upload. This "root" manifest file commonly links to either subunits (which in turn link to lessons or other subunits) or lessons, which will be uploaded.
22-
23-
Instead of working with IDs directly, items are linked and mapped with "friendly names", which are human-readable identifiers that are only used during the uploading process. Instead of specifying an ID for a unit/project, specify a friendly name. If the item doesn't already exist, it will be created.
24-
25-
Units can reference lessons or other units. If you need to use someone else's unit/lesson, you can use their ID by starting the ID with a ":" and placing it in the friendly name field.
26-
27-
Unit manifest files contain the definition for the unit. That is, they include a starting lesson for the unit, and what lessons other lessons point to. They follow the following format:
28-
29-
```json
30-
{
31-
"type": "unit",
32-
"id": "Friendly Name",
33-
"name": "Display Name",
34-
"upload": ["folder1/manifest.json"],
35-
"start": "first_lesson",
36-
"lessons": {
37-
"first_lesson": {
38-
"next": "next_lesson"
39-
},
40-
"next_lesson": {
41-
"next": []
42-
}
43-
}
44-
}
45-
```
46-
47-
Lesson manifest files include information about the lesson. They should be included in the directory containing the lesson's contents. For example, a lesson manifest might be in a folder that looks like:
48-
49-
```
50-
folder/
51-
-- index.js
52-
-- manifest.json
53-
-- README.md
54-
```
55-
56-
During the uploading process, the manifest will not be uploaded. For a lesson manifest, the following format is used:
57-
58-
```json
59-
{
60-
"type": "lesson",
61-
"id": "Friendly Name",
62-
"name": "Display Name"
63-
}
64-
```
65-
66-
A typical setup might look like the below file tree, where the first manifest is the first example manifest and the second manifest is the second example manifest:
67-
68-
```
69-
folder/
70-
-- manifest.json
71-
-- lessons/
72-
-- lesson_1/
73-
-- index.js
74-
-- manifest.json
75-
-- README.md
76-
```
77-
78-
You may also subdivide your unit into multiple smaller units. In the example below, the first two manifests are unit manifests (like the first example manifest), while the second is a lesson manifest (like the second example manifest). In this example, the first manifest may upload the second manifest and link to the unit described by the second manifest, while the second manifest may upload the third and link to the lesson described by the third.
79-
80-
```
81-
folder/
82-
-- manifest.json
83-
-- units/
84-
-- unit_1/
85-
-- manifest.json
86-
-- lessons/
87-
-- lesson_1/
88-
-- index.js
89-
-- manifest.json
90-
-- README.md
91-
```
92-
93-
As you can see, many configurations are possible. To look at an actual example, please head over to the [Cratecode Intro](https://github.com/Cratecode/intro.git) repository.
19+
For more info on how to create lessons and units, head over to the [CLI repository](https://github.com/Cratecode/cli.git).

0 commit comments

Comments
 (0)