1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
|
{
"id": "02-architecture",
"title": "Architecture without the mystery",
"icon": "🏗",
"level": "beginner",
"lessons": [
{
"id": "2.1",
"title": "Terminal, modules, commands",
"objective": "See how the terminal, module manager and command registry fit together.",
"minutes": 9,
"commands": [
"modules",
"status",
"help"
],
"blocks": [
{
"type": "text",
"text": "`terminal.js` parses input and dispatches a command to the module that registered it. Each module owns a `commands` map and contributes help strings."
},
{
"type": "cmd",
"text": "modules"
},
{
"type": "text",
"text": "The module manager lists every loaded module and its command count."
},
{
"type": "cmd",
"text": "status"
},
{
"type": "text",
"text": "`status` shows files, modules and network state in one place."
},
{
"type": "cmd",
"text": "check"
},
{
"type": "tip",
"text": "A command that exists in `help` but fails at runtime usually has an unmet module requirement that `check` reports."
}
],
"exercise": {
"instruction": "List the loaded modules.",
"accept": [
"modules",
"status"
],
"check": {
"type": "command"
},
"hint": "Type: modules"
},
"quiz": {
"q": "Who executes a command after you press Enter?",
"options": [
"nginx",
"the module that registered it",
"the browser cache"
],
"answer": 1
},
"sources": [
"modules/core/terminal.js",
"modules/core/module-manager.js",
"modules/core/module-system.js"
]
},
{
"id": "2.2",
"title": "VFS and the three loading tiers",
"objective": "Understand where files live and why a module edit sometimes needs a rebuild and sometimes does not.",
"minutes": 10,
"commands": [
"status",
"help",
"load-local"
],
"blocks": [
{
"type": "text",
"text": "Files live in `virtual-fs.js` (in-memory + localStorage persistence). Directories are nodes; `readFile()` returns `null` for a missing path."
},
{
"type": "text",
"text": "Modules ship in three tiers:"
},
{
"type": "table",
"text": "core-bundle.js — core modules (requires rebuild) | critical-ext-bundle.js — editor, shell, alias, finder, filemgr, diff, busybox (requires rebuild) | individually loaded ext modules — cache-busted by LATEST_VER (no rebuild)"
},
{
"type": "cmd",
"text": "status"
},
{
"type": "warn",
"text": "Individually loaded modules are cached with `?v=<webx11_cache_ver>`. Without bumping `LATEST_VER`, users keep the old file."
}
],
"exercise": {
"instruction": "Run `status` and find the VFS size line.",
"accept": [
"status"
],
"check": {
"type": "command"
},
"hint": "Type: status"
},
"quiz": {
"q": "Which tier needs `rebuild-bundles.py` after an edit?",
"options": [
"core-bundle.js",
"webdav.js",
"course.js"
],
"answer": 0
},
"sources": [
"modules/core/virtual-fs.js",
"modules/core/module-loader.js",
"scripts/rebuild-bundles.py"
]
}
]
}
|