@prairielearn/html 4.0.5 → 4.0.7
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.
- package/CHANGELOG.md +12 -0
- package/README.md +2 -2
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -42,10 +42,10 @@ console.log(html`
|
|
|
42
42
|
|
|
43
43
|
## Why not EJS?
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
In the past, PrairieLearn used EJS to render most views. However, using a tagged template literal and pure JavaScript to render views has a number of advantages:
|
|
46
46
|
|
|
47
47
|
- Prettier will automatically format the content of any `html` tagged template literal; EJS does not have any automatic formatters.
|
|
48
48
|
- Authoring views in pure JavaScript allows for easier and more explicit composition of components.
|
|
49
49
|
- It's possible to use ESLint and TypeScript to type-check JavaScript views; EJS does not offer support for either.
|
|
50
50
|
|
|
51
|
-
If you want to use existing EJS partials inside of an `html` tagged template literal, check out the `@prairielearn/html-ejs` package. EJS-related functionality is deliberately located in a separate package so that `@prairielearn/html` can be used in the browser, since the `ejs` package makes use of Node-only features.
|
|
51
|
+
If you want to use existing EJS partials inside of an `html` tagged template literal, check out the `@prairielearn/html-ejs` package. EJS-related functionality is deliberately located in a separate package so that `@prairielearn/html` can be used in the browser, since the `ejs` package makes use of Node-only features. Note, though, that this package is no longer used in PrairieLearn itself, and as such will no longer be actively maintained.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prairielearn/html",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -16,12 +16,12 @@
|
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
18
|
"@prairielearn/tsconfig": "^0.0.0",
|
|
19
|
-
"@types/node": "^20.
|
|
19
|
+
"@types/node": "^20.17.9",
|
|
20
20
|
"c8": "^10.1.2",
|
|
21
|
-
"chai": "^5.1.
|
|
22
|
-
"mocha": "^10.
|
|
23
|
-
"tsx": "^4.
|
|
24
|
-
"typescript": "^5.
|
|
21
|
+
"chai": "^5.1.2",
|
|
22
|
+
"mocha": "^10.8.2",
|
|
23
|
+
"tsx": "^4.19.2",
|
|
24
|
+
"typescript": "^5.7.2"
|
|
25
25
|
},
|
|
26
26
|
"c8": {
|
|
27
27
|
"reporter": [
|