SCORM layout recipes for SPA courses¶
For LessonKit 1.0 React projects, prefer lessonkit package --target scorm12 (or scorm2004) after lessonkit build — see LessonKit packaging. The recipes below also apply to lxpack build --lessonkit and @lxpack/api interchange packaging.
Recipe A — Single SCO SPA (default)¶
One type: spa lesson; in-app routing inside the SPA. SCORM 1.2 and single-SCO SCORM 2004 launches use one package entry.
- LessonKit:
single-spalayout - Interchange: one lesson in
lessonkit.json - SCORM layout:
inferScormSpaLayout()returnssingle-sco-spa(one lesson); packaging usesscorm12/ single-SCO targets
Recipe B — Multi SCO SPA¶
One SPA build folder per lesson id; SCORM 2004 can emit one SCO per lesson.
- LessonKit:
per-lesson-spa - Interchange: multiple lessons with distinct
path/ dist folders - SCORM layout:
inferScormSpaLayout()returnsmulti-sco-spa(multiple lessons); use--target scorm2004for per-activity SCOs
lxpack build --lessonkit ./lessonkit.json \
--spa-lesson intro=/abs/dist/intro \
--spa-lesson quiz=/abs/dist/quiz \
--target scorm2004
LXPack warns when multiple lessons share the same path (multi-SCO needs separate folders).