Skip to content

Commit 5286053

Browse files
committed
chore: repo cleanup
1 parent b949828 commit 5286053

File tree

3 files changed

+21
-16
lines changed

3 files changed

+21
-16
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@
22
/dist
33
.pnpm-debug.log
44
/coverage
5-
.DS_Store
5+
.DS_Store
6+
7+
example.html

.sizesnap.json

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
{
2+
"dist/index.d.ts": {
3+
"size": "79B",
4+
"brotli": "57B",
5+
"gzip": "82B"
6+
},
27
"dist/index.js": {
3-
"size": "3.039KB",
4-
"brotli": "955B",
5-
"gzip": "1.081KB"
8+
"size": "2.811KB",
9+
"brotli": "898B",
10+
"gzip": "1.031KB"
611
},
712
"dist/index.mjs": {
8-
"size": "2.041KB",
9-
"brotli": "599B",
10-
"gzip": "703B"
13+
"size": "1.813KB",
14+
"brotli": "563B",
15+
"gzip": "653B"
1116
}
1217
}

bench/time.js

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,12 @@
33
const { renderToString } = require('../dist/index.js')
44
const fs = require('fs')
55

6-
let html, reactive, pretty
6+
let html, reactive
77

88
async function importArrow() {
99
const mod = await import('@arrow-js/core')
10-
const pmod = await import('pretty-bytes')
1110
html = mod.html
1211
reactive = mod.reactive
13-
pretty = pmod.default
1412
return
1513
}
1614

@@ -35,15 +33,15 @@ importArrow().then(_ => {
3533

3634
const links = Array.from(new Array(10000).fill(0)).map((x, ind) => ind)
3735
const outerLinks = Array.from(new Array(100).fill(0)).map((x, ind) => ind)
36+
const outerLinkComponents = outerLinks.map(
37+
_ => html`<li>${links.map(y => html`<p>${y}</p> `)}</li>`
38+
)
3839
const NavBar = () =>
3940
html`
4041
<header>
4142
<nav>
4243
<ul>
43-
${() =>
44-
outerLinks.map(
45-
_ => html`<li>${links.map(y => html`<p>${y}</p> `)}</li>`
46-
)}
44+
${outerLinkComponents}
4745
</ul>
4846
</nav>
4947
</header>
@@ -58,8 +56,8 @@ importArrow().then(_ => {
5856
<button @click="${() => (state.count += 1)}">${() => state.count}</button>
5957
`
6058
}
61-
62-
const out = renderToString(NavBar())
59+
const template = NavBar()
60+
const out = renderToString(template)
6361
const str = fs.createWriteStream('example.html', 'utf8')
6462
str.write(out)
6563
str.end()

0 commit comments

Comments
 (0)