@eliceio/cdk-cli 0.0.0-stage → 0.1.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (141) hide show
  1. package/README.md +526 -2
  2. package/es/bin/index.d.ts +2 -0
  3. package/es/bin/index.js +10 -0
  4. package/es/cli.d.ts +5 -0
  5. package/es/cli.js +209 -0
  6. package/es/commands/build/index.d.ts +30 -0
  7. package/es/commands/build/index.js +163 -0
  8. package/es/commands/check/index.d.ts +9 -0
  9. package/es/commands/check/index.js +31 -0
  10. package/es/commands/create/index.d.ts +8 -0
  11. package/es/commands/create/index.js +22 -0
  12. package/es/commands/create/scaffold.d.ts +24 -0
  13. package/es/commands/create/scaffold.js +82 -0
  14. package/es/commands/dev/index.d.ts +6 -0
  15. package/es/commands/dev/index.js +40 -0
  16. package/es/commands/doctor/index.d.ts +34 -0
  17. package/es/commands/doctor/index.js +311 -0
  18. package/es/commands/guide/index.d.ts +29 -0
  19. package/es/commands/guide/index.js +120 -0
  20. package/es/commands/skill/index.d.ts +48 -0
  21. package/es/commands/skill/index.js +173 -0
  22. package/es/core/collect.d.ts +21 -0
  23. package/es/core/collect.js +89 -0
  24. package/es/core/config.d.ts +55 -0
  25. package/es/core/config.js +109 -0
  26. package/es/core/manifest.d.ts +15 -0
  27. package/es/core/manifest.js +43 -0
  28. package/es/core/minify.d.ts +18 -0
  29. package/es/core/minify.js +93 -0
  30. package/es/core/prepare.d.ts +12 -0
  31. package/es/core/prepare.js +86 -0
  32. package/es/core/protocol.d.ts +2 -0
  33. package/es/core/protocol.js +4 -0
  34. package/es/core/sandbox.d.ts +17 -0
  35. package/es/core/sandbox.js +182 -0
  36. package/es/core/zip.d.ts +4 -0
  37. package/es/core/zip.js +17 -0
  38. package/es/dev/grading.d.ts +15 -0
  39. package/es/dev/grading.js +37 -0
  40. package/es/dev/host-page.d.ts +7 -0
  41. package/es/dev/host-page.js +240 -0
  42. package/es/dev/inject.d.ts +8 -0
  43. package/es/dev/inject.js +38 -0
  44. package/es/dev/mock-api.d.ts +65 -0
  45. package/es/dev/mock-api.js +269 -0
  46. package/es/dev/server.d.ts +25 -0
  47. package/es/dev/server.js +309 -0
  48. package/es/engines/static/index.d.ts +3 -0
  49. package/es/engines/static/index.js +11 -0
  50. package/es/engines/types.d.ts +12 -0
  51. package/es/engines/vite/index.d.ts +2 -0
  52. package/es/engines/vite/index.js +4 -0
  53. package/es/index.d.ts +2 -0
  54. package/es/index.js +2 -0
  55. package/es/rules/check.d.ts +2 -0
  56. package/es/rules/check.js +282 -0
  57. package/es/rules/index.d.ts +8 -0
  58. package/es/rules/index.js +7 -0
  59. package/es/rules/manifest.d.ts +39 -0
  60. package/es/rules/manifest.js +168 -0
  61. package/es/rules/node.d.ts +11 -0
  62. package/es/rules/node.js +87 -0
  63. package/es/rules/path.d.ts +7 -0
  64. package/es/rules/path.js +35 -0
  65. package/es/rules/refs.d.ts +19 -0
  66. package/es/rules/refs.js +111 -0
  67. package/es/rules/skip.d.ts +12 -0
  68. package/es/rules/skip.js +55 -0
  69. package/es/rules/spec.d.ts +3 -0
  70. package/es/rules/spec.js +6 -0
  71. package/es/rules/types.d.ts +140 -0
  72. package/es/rules/unused.d.ts +7 -0
  73. package/es/rules/unused.js +21 -0
  74. package/es/rules/zip.d.ts +13 -0
  75. package/es/rules/zip.js +45 -0
  76. package/es/rules.json.js +3 -0
  77. package/es/types.d.ts +4 -0
  78. package/es/version.d.ts +2 -0
  79. package/es/version.js +7 -0
  80. package/guides/content-development.md +207 -0
  81. package/package.json +50 -3
  82. package/rules.json +608 -0
  83. package/skills/_shared/always.md +7 -0
  84. package/skills/elice-content-check/SKILL.md +22 -0
  85. package/skills/elice-content-create/SKILL.md +21 -0
  86. package/skills/elice-content-migrate/SKILL.md +21 -0
  87. package/templates/_shared/lib/cdk-mock.d.ts +94 -0
  88. package/templates/_shared/lib/cdk-mock.js +429 -0
  89. package/templates/_shared/lib/cdk.js +3 -0
  90. package/templates/_shared/lib/elice-content.css +262 -0
  91. package/templates/_shared/lib/elice-content.d.ts +123 -0
  92. package/templates/_shared/lib/elice-content.js +534 -0
  93. package/templates/_shared/lib/elice-tokens.css +446 -0
  94. package/templates/blank/README.md +64 -0
  95. package/templates/blank/commentary.txt +2 -0
  96. package/templates/blank/content.json +4 -0
  97. package/templates/blank/edit.html +15 -0
  98. package/templates/blank/elice.config.json +12 -0
  99. package/templates/blank/gitignore +3 -0
  100. package/templates/blank/index.html +15 -0
  101. package/templates/blank/instructor.html +15 -0
  102. package/templates/blank/screens/edit.js +21 -0
  103. package/templates/blank/screens/instructor.js +9 -0
  104. package/templates/blank/screens/learn.js +19 -0
  105. package/templates/blank/styles.css +1 -0
  106. package/templates/quiz/README.md +108 -0
  107. package/templates/quiz/commentary.txt +2 -0
  108. package/templates/quiz/content.json +81 -0
  109. package/templates/quiz/core/behaviors.d.ts +59 -0
  110. package/templates/quiz/core/behaviors.js +310 -0
  111. package/templates/quiz/core/dom.d.ts +13 -0
  112. package/templates/quiz/core/dom.js +83 -0
  113. package/templates/quiz/core/editor.d.ts +48 -0
  114. package/templates/quiz/core/editor.js +206 -0
  115. package/templates/quiz/core/markdown.d.ts +2 -0
  116. package/templates/quiz/core/markdown.js +84 -0
  117. package/templates/quiz/core/model.d.ts +20 -0
  118. package/templates/quiz/core/model.js +203 -0
  119. package/templates/quiz/edit.html +17 -0
  120. package/templates/quiz/elice.config.json +14 -0
  121. package/templates/quiz/gitignore +3 -0
  122. package/templates/quiz/grading.json +13 -0
  123. package/templates/quiz/index.html +17 -0
  124. package/templates/quiz/instructor.html +17 -0
  125. package/templates/quiz/screens/edit.js +139 -0
  126. package/templates/quiz/screens/instructor.js +27 -0
  127. package/templates/quiz/screens/learn.js +55 -0
  128. package/templates/quiz/styles.css +570 -0
  129. package/templates/quiz/ui/templates/choice.js +22 -0
  130. package/templates/quiz/ui/templates/edit.d.ts +13 -0
  131. package/templates/quiz/ui/templates/edit.js +183 -0
  132. package/templates/quiz/ui/templates/group.js +68 -0
  133. package/templates/quiz/ui/templates/index.d.ts +5 -0
  134. package/templates/quiz/ui/templates/index.js +17 -0
  135. package/templates/quiz/ui/templates/order.js +35 -0
  136. package/templates/quiz/ui/templates/page.js +29 -0
  137. package/templates/quiz/ui/templates/question.js +28 -0
  138. package/templates/quiz/ui/templates/text.js +16 -0
  139. package/templates/quiz/ui/texts.d.ts +3 -0
  140. package/templates/quiz/ui/texts.js +127 -0
  141. package/templates/quiz/ui/theme.css +50 -0
@@ -0,0 +1,207 @@
1
+ # Developing Elice Custom HTML learning materials
2
+
3
+ A Custom HTML learning material is **a small web app in one zip**. Anything that runs in a browser can be a learning material: an explanation, an interactive simulation or visualization, a guided exercise, a game-like activity, flashcards, a self-check or survey, a quiz, or the description of a practice problem.
4
+
5
+ Build it with the `ecdk` CLI (`@eliceio/cdk-cli`). Read one topic of this guide with `ecdk guide <topic>` (`ecdk guide` lists the topics). For a command's options, run `ecdk <command> --help`.
6
+
7
+ One zip has up to three screens.
8
+
9
+ | Screen | Files | What it does |
10
+ | ----------------------- | ------------------------------------------- | -------------------------------------------------------------------------------------------- |
11
+ | Student (required) | `index.html` + `screens/learn.js` | The learning activity (read, interact, solve, make). Submits a result when needed |
12
+ | Instructor (optional) | `instructor.html` + `screens/instructor.js` | What only instructors see: activity summary, explanations, teaching tips |
13
+ | Content edit (optional) | `edit.html` + `screens/edit.js` | Instructors edit text and data without code and save it → `app.content` of the other screens |
14
+
15
+ Elice opens the content in a **sandboxed (`allow-scripts`) iframe on another origin**. There is no server: everything runs as browser JS, and only submission, saving and grading go to the Elice server.
16
+
17
+ ## 0. What the person decides
18
+
19
+ The person (the instructor or author) is responsible for the content and its answers. Do not settle the following on your own; ask, or get a confirmation.
20
+
21
+ 1. **The learning goal, when it is unclear.** Decide the rest of the design to fit the goal and tell the person briefly what you decided.
22
+ 2. **Correct answers.** You may draft answers and rubrics, but the person confirms that they are right.
23
+ 3. **The supported grading types** (`gradingTypes`). Propose the types that fit the material and get a confirmation.
24
+ 4. **What the learning notes say** (`commentary.txt`). A material needs them (LXP rejects the upload without them); once they are filled in, AI Helpy answers only questions about this material, so let the person check the wording.
25
+ 5. **Checking the screens.** The person looks at the student, tutoring, instructor, edit and mobile views in the preview. When they cannot, tell them what to check and in which order.
26
+ 6. **Uploading to LXP.** A saved version is **visible to learners at once** (when the page is open). Before uploading, show what changes and get approval. The same goes for changing a material that is already open, changing answers, and restoring an older version.
27
+ 7. **Global installs, accounts and permissions.** Leave them to the person.
28
+
29
+ ## 1. Check the environment
30
+
31
+ ```bash
32
+ ecdk --version && ecdk doctor --json
33
+ ```
34
+
35
+ - Without `ecdk`: it needs Node.js 20.19 or later (22 LTS recommended) and `@eliceio/cdk-cli`. Tell the user how to install it, and run **a global install (`npm install -g @eliceio/cdk-cli`) only after the user agrees**. Without agreement, run `npx @eliceio/cdk-cli <command>`.
36
+ - Fix each `fail` item in `doctor` as its `fix.description` says. `--fix` fixes only the items that can be fixed automatically.
37
+
38
+ ## 2. Design the material
39
+
40
+ Decide the following before writing code. Decide what the request leaves out to fit the material's purpose, and tell the user briefly what you decided. Ask only when the learning goal is unclear.
41
+
42
+ **① What the student does**
43
+ Read or watch / change values and observe (simulation, visualization) / follow steps / solve problems / make something. Tie the activity directly to the learning goal.
44
+
45
+ **② Completion and grading** (`gradingTypes`: **every type** this material supports, at least one, from `on_access` · `on_submit` · `pattern` · `rubric`. The instructor picks one of them in LXP)
46
+
47
+ | Material | type | Student screen |
48
+ | ----------------------------------------------------------- | ----------------------------- | ----------------------------------------- |
49
+ | Something to read or watch, such as a simulation | `on_access` (done on open) | No submission |
50
+ | Done when the activity ends (results, self-check, survey) | `on_submit` (100 on submit) | Submit the result with `useSubmit` |
51
+ | One correct answer or one set of answers | `pattern` (`exact` · `regex`) | `useSubmit` |
52
+ | Writing or assignments graded against a rubric (AI grading) | `rubric` | `useSubmit`, the score comes back at once |
53
+
54
+ Custom HTML does not use manual grading (`manual`) or no grading (`none`); setting them is an error. A material that needs no score still picks `on_access` or `on_submit`. There is no per-question grading: `pattern` compares the whole answer at once, so every question must be right for 100. Changing the answers does not regrade past submissions; the new answers apply to later ones. `metadata.json` holds only `gradingTypes`; the correct answers go in the LXP grading settings. Examples: a material to watch `["on_access"]`, an activity with one answer `["on_submit", "pattern"]`, the quiz template all four.
55
+
56
+ **②-1 Learning notes**: write the key concepts, the activity, and the intent of the questions in `commentary.txt` (plain text) at the top of the project. `build` puts it in the zip and writes `"commentary": "commentary.txt"` in `metadata.json`; LXP's AI Helpy and AI quiz generation read it. It is inside the zip, so students can read it: **never put answers in it.** A material needs it: LXP rejects an upload without learning notes, and `ecdk check` reports `manifest.commentary-missing` (a problem description, `kind: description`, does not need it). Once it is filled in, AI Helpy answers only questions about this material.
57
+
58
+ **③ Does it need an instructor screen?** Make one when there are explanations, a summary of the answer conditions, or teaching tips. Turn it off when it would equal the student screen.
59
+
60
+ **④ Does it need a content edit screen?** When instructors may want to rewrite text, numbers or lists (for example a simulation's initial values, a card list, step descriptions), collect them in `content.json` and let the edit screen change them. Turn it off when there is nothing to edit.
61
+
62
+ **⑤ Purpose**: the material itself (`kind: material`, the default), or the **problem description** of another material such as a practice (`kind: description`: student screen only, no grading, no `gradingTypes`).
63
+
64
+ ## 3. Create the project
65
+
66
+ | Case | Start with |
67
+ | --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
68
+ | A multi-question quiz | `ecdk create <folder>` (quiz template: five question types, with an edit screen) |
69
+ | Any other material | `ecdk create <folder> --template blank` (skeleton of the three screens) |
70
+ | A dark screen | Add `--theme dark` to the above |
71
+ | A problem description | Create with blank, set `elice.config.json` to `{ "kind": "description", "screens": { "learn": "index.html" } }`, delete the instructor and edit files |
72
+ | An existing HTML page | [7. Move existing HTML](#7-move-existing-html) |
73
+
74
+ `create` refuses a folder that is not empty. Use a new subfolder.
75
+
76
+ Then:
77
+
78
+ 1. Set `screens` in `elice.config.json` to the design (only the screens you keep: `{ "learn": "index.html", "edit": "edit.html" }`) and `gradingTypes` as in ②. Put the type, answers and rubric for local checks in `grading.json`.
79
+ 2. Shape `content.json` as the data in ④.
80
+ 3. Write the screen code ([5](#5-screen-code)). Delete the HTML and JS of screens you do not use.
81
+ 4. Check ([9](#9-check)) → build ([10](#10-build)).
82
+
83
+ ## 4. Rules
84
+
85
+ 1. **Never put correct answers in the content**: not in `content.json`, the screen code, or comments. They reach the student's browser. Answers go in the LXP **grading settings**, and in `grading.json` only for local checks (it is left out of the zip). `elice.config.json` holds only the list of supported types (`gradingTypes`).
86
+ 2. **Screen code calls only `lib/elice-content.js` (the kit).** Do not edit `lib/`. Do not call the SDK (`lib/cdk.js`) directly.
87
+ 3. **Do not use blocked features**: `localStorage` · `sessionStorage` · `indexedDB` · `document.cookie` · `alert`/`confirm`/`prompt` · `window.open` · `<form>` submission · access to `window.parent`/`top` · `fetch`/`WebSocket` to external addresses · external `<script src>`. To keep progress, submit it (`useSubmit`); to keep content, save it from the edit screen.
88
+ 4. **Libraries and media go inside the zip.** Download libraries for charts, visualization or physics (for example Chart.js, D3, p5.js) into `vendor/` and load them by relative path instead of a CDN. Fonts, images and sounds also go in the zip. Limits: zip 20 MB, 300 files. Upload long videos separately as Elice video materials.
89
+ 5. **Use relative paths** (`img/a.png`). Paths starting with `/` break. Match file name case. Prefer letters, digits, `-` and `_`.
90
+ 6. **Switch views inside one HTML.** Show and hide steps or pages within the same HTML. Moving to another HTML or reloading loses the access token and shows "please reopen the material".
91
+ 7. **Never insert user input as HTML**: use `textContent`. When `innerHTML` is really needed, escape it and leave `// ecdk-ignore-next-line sec.html-injection` with the reason.
92
+ 8. **Colors and fonts use EDS tokens** (`var(--eds-primary-main)`, `var(--eds-text-primary)`, `var(--eds-background-paper)` …). When drawing on canvas or SVG, read them with `getComputedStyle(document.documentElement).getPropertyValue('--eds-primary-main')`. Do not write colors directly (the dark theme will not match).
93
+ 9. **Mobile and accessibility**: touch targets 44 px or more, input text 16 px, no breakage at 360 px width. Work with touch (Pointer Events) and keyboard, not only a mouse. Give images `alt`.
94
+ 10. Never include keys, tokens or passwords (comments are checked too).
95
+
96
+ ## 5. Screen code
97
+
98
+ ```js
99
+ import { start } from '../lib/elice-content.js';
100
+
101
+ // Student screen
102
+ const app = await start({ screen: 'learn' });
103
+ render(app.content); // what the edit screen saved, or content.json
104
+
105
+ // Only for materials with a submission: say how to collect and restore the answer (result).
106
+ // Locking, restoring and result messages are handled by the kit.
107
+ app.useSubmit({
108
+ getAnswer: () => ({ result: currentResult() }), // small JSON (a few KB at most)
109
+ setAnswer: a => restore(a?.result), // filled on reopen and in tutoring
110
+ validate: a => a.result != null || 'Finish the activity before submitting.',
111
+ onResult: res => showFeedback(res), // grading result (score · isCorrect)
112
+ });
113
+ ```
114
+
115
+ ```js
116
+ // Content edit screen: render the fields and say what to save
117
+ const app = await start({ screen: 'edit' });
118
+ renderForm(app.content);
119
+ app.useSave({
120
+ getContent: () => ({ ...app.content, title: titleInput.value, steps: readSteps() }),
121
+ validate: c => c.title.trim() !== '' || 'Enter a title.',
122
+ });
123
+ ```
124
+
125
+ - Saving on the edit screen (`useSave`) only **hands the content to the LXP edit page** (SDK `saveSettings`). The edit screen has no token and cannot save to the server; the content is saved to the material, and shown on the student and instructor screens, only when the instructor presses **Save at the bottom of the LXP edit page**. The kit shows this notice, so the screen code does not announce "saved" itself.
126
+ - Materials without a submission (`on_access`) do not call `useSubmit`.
127
+ - Use `app.mode` (`learn` · `preview` · `tutor` · `instructor` · `edit`), `app.readOnly` (tutoring) and `app.account.anonymousId` (for example a per-person fixed random seed) only when needed. The kit handles per-mode behavior such as the tutoring lock, so the screen code does not branch on the mode.
128
+ - Run simulations and animations with `requestAnimationFrame` and stop them while the view is hidden. Split heavy computation into small pieces.
129
+
130
+ ## 6. Using the quiz template
131
+
132
+ - Question types: `select_one` · `select_multiple` · `order` · `text` · `group`. Question, choice and group ids (`q1`, `a`, `g1`) are lower-case letters and digits; once set, do not change them.
133
+ - Student answer (a string per question): `{ "answers": { "q1": "b", "q2": "a,d", "q3": "c,a,b", "q4": "weight", "q5": "g1:a|g2:b,c" } }`. Multiple choice lists choice ids **sorted**, order lists them in slot order, and group lists `group:choices(sorted)` in group order joined by `|`.
134
+ - Answers (same shape in `grading.json` and the LXP grading settings). `pattern` compares the whole answer at once, so **everything must match for 100** (no partial score per question).
135
+
136
+ ```json
137
+ {
138
+ "type": "pattern",
139
+ "match": "exact",
140
+ "answer_key": {
141
+ "answers": { "q1": "b", "q2": "a,d", "q3": "c,a,b", "q4": "weight", "q5": "g1:a|g2:b,c" }
142
+ }
143
+ }
144
+ ```
145
+
146
+ - File split: **`ui/` is the look** (edit freely), **`screens/` is the layout** (which blocks in which order), **`core/` is behavior and the grading contract** (do not edit).
147
+ - Colors, spacing, corners, choice cards: the `--qz-*` variables in `ui/theme.css` (they point at EDS tokens, so `--theme dark` also fits)
148
+ - Text: `ui/texts.js` (tab title, loading, student, instructor, edit, and validation messages)
149
+ - Markup: the `` html`…` `` snippets in `ui/templates/*.js` (`choice` card, `question` frame, `order`, `group`, `text`, `page` header, `edit` fields). Inserted values are escaped. Classes and tags are free; **keep the `data-role` attributes** (`result` · `explanation` · `choice` · `input` · `pool` · `slots` · `items` and so on, listed at the top of each file) and selecting, dragging and the answer strings keep working.
150
+ - Behavior adds state as attributes: `data-result="correct|wrong"` · `data-dragging` · `data-ghost`. Style them in CSS.
151
+ - After a change, solve all five types in `ecdk dev` by clicking and dragging, submit, and check that the answer string (local grading) is unchanged.
152
+
153
+ To mix a visualization or simulation into a quiz, edit the quiz template, or write the question data in the same shape on top of blank.
154
+
155
+ ## 7. Move existing HTML
156
+
157
+ 1. Create a skeleton with `ecdk create <new folder> --template blank`.
158
+ 2. Move the original body, styles and scripts to the student screen (`index.html` · `screens/learn.js` · `styles.css`). Copy image, font and library folders as they are and use relative paths.
159
+ 3. Download external CDN scripts and fonts into the zip.
160
+ 4. Replace blocked code (storage, `alert`, external sends) as in [4](#4-rules).
161
+ 5. Merge multiple HTML pages into one HTML that switches views.
162
+ 6. Decide completion and grading as in [2 ②](#2-design-the-material) (without a submission, `"gradingTypes": ["on_access"]` in `elice.config.json`).
163
+ 7. Remove the instructor and edit screens from `screens` and delete their files when they are not needed.
164
+
165
+ ## 8. Fix check errors
166
+
167
+ Read `check.issues[]` (`id` · `level` · `path` · `line` · `message`) from `ecdk build --json`. With an `error` no zip is made. Each `message` says how to fix it.
168
+
169
+ | id | Fix |
170
+ | ---------------------------------------------- | ------------------------------------------------------------------------------------------------------ |
171
+ | `ref.missing` · `ref.case-mismatch` | Match the path and case to the real file |
172
+ | `ref.root-absolute` | Change `/…` to a relative path |
173
+ | `ref.external-script` · `ref.external-request` | Put the library or font in the zip and use a relative path |
174
+ | `api.storage` · `api.cookie` | Do not use storage. Submit results; save content from the edit screen |
175
+ | `api.dialog` · `api.window-open` · `html.form` | An in-page message · the same view · a button click + `useSubmit` |
176
+ | `api.external-send` | Remove the external send |
177
+ | `sec.html-injection` | Use `textContent`. If justified: escape + `ecdk-ignore` + the reason |
178
+ | `sec.secret` · `file.secret` | Remove the secret or the answer file (if it was already uploaded, tell the user to **revoke the key**) |
179
+ | `manifest.*` · `entry.*` | Check `screens` and `kind` in `elice.config.json` |
180
+ | `limit.*` · `file.large-image` | Shrink images and video, drop unused files (build output: "files not referenced anywhere") |
181
+
182
+ Use `ecdk-ignore`, which turns a rule off, only for legitimate code a regular expression cannot tell apart, and **always with the reason**. Do not scatter it to silence errors.
183
+
184
+ ## 9. Check
185
+
186
+ ```bash
187
+ ecdk dev # http://localhost:4170: student, tutoring, instructor, content edit; desktop and mobile widths
188
+ ```
189
+
190
+ - With a browser tool, open it and finish the student activity (with the score and result when it submits), then check the tutoring lock, saving on the edit screen → **Save** at the top of `ecdk dev` (the LXP bottom Save) → the change on the student screen, the mobile width, and the dark theme. Without one, ask the user to check in this order.
191
+ - Even after your own check, the person looks at the screens before uploading (see [0. What the person decides](#0-what-the-person-decides)).
192
+ - Fix the content console errors and 404s printed in the terminal.
193
+ - Opening files directly with `file://` is not a check.
194
+
195
+ ## 10. Build
196
+
197
+ ```bash
198
+ ecdk build --json
199
+ ```
200
+
201
+ - With `ok: true` the zip is `dist/content.zip`. To make it smaller, set `"minify": true` in `elice.config.json` (quiz template about 122 KB → 87 KB).
202
+ - Report to the user: what the material is (what the student does, which screens are on, how it completes), the zip path and size, **the values to put in the LXP grading settings** (when it is graded), the upload steps (Custom HTML material in LXP → upload the zip → grading settings → save → check the student and instructor screens), and anything left to check. Saving makes the new version visible to learners at once, so the person approves it first (see [0. What the person decides](#0-what-the-person-decides)).
203
+
204
+ ## 11. More
205
+
206
+ - CLI usage: the `@eliceio/cdk-cli` README
207
+ - Command help: `ecdk <command> --help`
package/package.json CHANGED
@@ -1,6 +1,53 @@
1
1
  {
2
2
  "name": "@eliceio/cdk-cli",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.1.0-alpha.2",
4
+ "description": "교육자용 Custom HTML 콘텐츠 CLI",
5
+ "license": "UNLICENSED",
6
+ "type": "module",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./es/index.d.ts",
10
+ "import": "./es/index.js"
11
+ }
12
+ },
13
+ "publishConfig": {
14
+ "access": "public"
15
+ },
16
+ "files": [
17
+ "es",
18
+ "guides",
19
+ "rules.json",
20
+ "skills",
21
+ "templates"
22
+ ],
23
+ "engines": {
24
+ "node": ">=20.19"
25
+ },
26
+ "bin": {
27
+ "ecdk": "./es/bin/index.js"
28
+ },
29
+ "browserslist": [
30
+ "node 20"
31
+ ],
32
+ "dependencies": {
33
+ "esbuild": "~0.28.2",
34
+ "fflate": "^0.8.3"
35
+ },
36
+ "devDependencies": {
37
+ "@elice/rollup-config": "^1.260406.0",
38
+ "@types/node": "^24.12.4",
39
+ "cross-env": "^7.0.2",
40
+ "del-cli": "^3.0.1",
41
+ "rollup": "^4.0.0",
42
+ "tslib": "^2.6.1",
43
+ "typescript": "~5.9.3",
44
+ "@eliceio/cdk": "^1.0.0-alpha.1"
45
+ },
46
+ "scripts": {
47
+ "prebuild": "del-cli \"buildcache/*\" \"es/*\" && node ../../scripts/copy-cdk.mjs",
48
+ "build": "cross-env NODE_ENV=production rollup -c ./rollup.config.ts --configPlugin typescript -f es",
49
+ "lint": "eslint src --max-warnings=0",
50
+ "typecheck": "tsc --noEmit -p tsconfig.json",
51
+ "test": "vitest run --root ../.. packages/eliceio-cdk-cli"
52
+ }
6
53
  }