it's alive

This commit is contained in:
Chris Wanstrath 2025-11-01 23:11:52 -07:00 committed by Chris Wanstrath
parent 6cb4d69088
commit 4fc1a965eb
2 changed files with 4 additions and 5 deletions

View File

@ -62,7 +62,7 @@
"hono": ["hono@4.9.8", "", {}, "sha512-JW8Bb4RFWD9iOKxg5PbUarBYGM99IcxFl2FPBo2gSJO11jjUDqlP1Bmfyqt8Z/dGhIQ63PMA9LdcLefXyIasyg=="],
"reefvm": ["reefvm@git+https://git.nose.space/defunkt/reefvm#c69b172c78853756ec8acba5bc33d93eb6a571c6", { "peerDependencies": { "typescript": "^5" } }, "c69b172c78853756ec8acba5bc33d93eb6a571c6"],
"reefvm": ["reefvm@git+https://git.nose.space/defunkt/reefvm#0f39e9401eb7a0a7c906e150127f9829458a79b6", { "peerDependencies": { "typescript": "^5" } }, "0f39e9401eb7a0a7c906e150127f9829458a79b6"],
"style-mod": ["style-mod@4.1.2", "", {}, "sha512-wnD1HyVqpJUI2+eKZ+eo1UwghftP6yuFheBqqe+bWCotBjC2K1YnteJILRMs3SM4V/0dLEW1SC27MWP5y+mwmw=="],

View File

@ -1,5 +1,4 @@
import { expect, describe, test, beforeEach } from 'bun:test'
import { type Value } from 'reefvm'
const buffer: string[] = []
@ -8,8 +7,8 @@ const ribbitGlobals = {
await cb()
return buffer.join("\n")
},
tag: (tagName: string, atDefaults = {}) => {
return (atNamed = {}, ...args: any[]) => tag(tagName, Object.assign({}, atDefaults, atNamed), ...args)
tag: async (tagFn: Function, atDefaults = {}) => {
return (atNamed = {}, ...args: any[]) => tagFn(Object.assign({}, atDefaults, atNamed), ...args)
},
head: (atNamed: {}, ...args: any[]) => tag('head', atNamed, ...args),
title: (atNamed: {}, ...args: any[]) => tag('title', atNamed, ...args),
@ -81,7 +80,7 @@ end
test('custom tags', () => {
expect(`
list = tag 'ul' class=list
list = tag ul class=list
ribbit:
list:
li border-bottom='1px solid black' one