boxwood 0.78.0 → 0.79.0
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/README.md +3 -3
- package/index.js +1 -1
- package/package.json +4 -1
package/README.md
CHANGED
|
@@ -42,7 +42,7 @@ const { compile } = require("boxwood")
|
|
|
42
42
|
const { join } = require("path")
|
|
43
43
|
// ...
|
|
44
44
|
const path = join(__dirname, "index.js")
|
|
45
|
-
const { template } =
|
|
45
|
+
const { template } = compile(path)
|
|
46
46
|
// ...
|
|
47
47
|
const html = template({ foo: "bar" })
|
|
48
48
|
console.log(html)
|
|
@@ -121,13 +121,13 @@ const assert = require("node:assert")
|
|
|
121
121
|
const { compile } = require("boxwood")
|
|
122
122
|
|
|
123
123
|
test("banner renders a title", async () => {
|
|
124
|
-
const { template } =
|
|
124
|
+
const { template } = compile(__dirname)
|
|
125
125
|
const html = template({ title: "foo" })
|
|
126
126
|
assert(html.includes("<h1>foo</h1>"))
|
|
127
127
|
})
|
|
128
128
|
|
|
129
129
|
test("banner renders an optional description", async () => {
|
|
130
|
-
const { template } =
|
|
130
|
+
const { template } = compile(__dirname)
|
|
131
131
|
const html = template({ title: "foo", description: "bar" })
|
|
132
132
|
assert(html.includes("<h1>foo</h1>"))
|
|
133
133
|
assert(html.includes("<p>bar</p>"))
|
package/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "boxwood",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.79.0",
|
|
4
4
|
"description": "Compile HTML templates into JS",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -64,5 +64,8 @@
|
|
|
64
64
|
"dependencies": {
|
|
65
65
|
"css-tree": "^2.3.1",
|
|
66
66
|
"string-hash": "^1.1.3"
|
|
67
|
+
},
|
|
68
|
+
"prettier": {
|
|
69
|
+
"semi": false
|
|
67
70
|
}
|
|
68
71
|
}
|