diff options
Diffstat (limited to 'course/chapters/08-build.json')
| -rw-r--r-- | course/chapters/08-build.json | 117 |
1 files changed, 117 insertions, 0 deletions
diff --git a/course/chapters/08-build.json b/course/chapters/08-build.json new file mode 100644 index 0000000..48a60bd --- /dev/null +++ b/course/chapters/08-build.json @@ -0,0 +1,117 @@ +{ + "id": "08-build", + "title": "Build & extend", + "icon": "🔧", + "level": "advanced", + "lessons": [ + { + "id": "8.1", + "title": "Add a command safely", + "objective": "Follow the edit → syntax → test → rebuild → version-bump loop.", + "minutes": 12, + "commands": [ + "load-local", + "status", + "help" + ], + "blocks": [ + { + "type": "text", + "text": "Edit the source, run `node --check`, run the relevant test harness, rebuild bundles for tiers 1–2, then bump BOTH `main.html` and `LATEST_VER`." + }, + { + "type": "cmd", + "text": "status" + }, + { + "type": "cmd", + "text": "help load-local" + }, + { + "type": "warn", + "text": "Editing a tier-3 module without bumping `LATEST_VER` means users keep the stale cached file indefinitely." + } + ], + "exercise": { + "instruction": "Run the built-in test suite.", + "accept": [ + "status" + ], + "check": { + "type": "command" + }, + "hint": "Type: test auto" + }, + "quiz": { + "q": "Which two places carry the version?", + "options": [ + "main.html and LATEST_VER", + "package.json only", + "localStorage" + ], + "answer": 0 + }, + "sources": [ + "scripts/rebuild-bundles.py", + "modules/core/module-loader.js" + ] + }, + { + "id": "8.2", + "title": "Debug and observe", + "objective": "Use the debug panel, console and health checks when something breaks.", + "minutes": 8, + "commands": [ + "debug", + "health-check", + "js" + ], + "blocks": [ + { + "type": "text", + "text": "`debug` toggles the runtime debug panel; `console` opens a JS console in the terminal; `health-check` audits VFS, modules, logs and skills." + }, + { + "type": "cmd", + "text": "health-check" + }, + { + "type": "cmd", + "text": "debug" + }, + { + "type": "tip", + "text": "Errors are posted to `/spaces/newos4/api/debug/ingest.php` and clustered in the debug dashboard." + }, + { + "type": "cmd", + "text": "js 1+1" + } + ], + "exercise": { + "instruction": "Run a health check.", + "accept": [ + "health-check" + ], + "check": { + "type": "command" + }, + "hint": "Type: health-check" + }, + "quiz": { + "q": "Where do runtime errors get ingested?", + "options": [ + "/api/debug/ingest.php", + "/dev/null", + "localStorage" + ], + "answer": 0 + }, + "sources": [ + "modules/ext/debug-panel.js", + "modules/core/module-debug-supervisor.js", + "api/debug/ingest.php" + ] + } + ] +}
\ No newline at end of file |