Compare commits

..

No commits in common. "859ed7402ab43a3f26f05a6b735f68788038b1bf" and "c81922fc97162d2672a260c7ae145f052396af4e" have entirely different histories.

2 changed files with 6 additions and 5 deletions

View File

@ -12,7 +12,7 @@ Go to http://localhost:3000 to try out the playground.
tail log.txt lines=50
name = "Shrimp"
greet = do person: echo "Hello" person
greet = fn person: echo "Hello" person
result = tail log.txt lines=10

View File

@ -1,4 +1,5 @@
import { expect, describe, test, beforeEach } from 'bun:test'
import { type Value } from 'reefvm'
const buffer: string[] = []
@ -7,8 +8,8 @@ const ribbitGlobals = {
await cb()
return buffer.join("\n")
},
tag: async (tagFn: Function, atDefaults = {}) => {
return (atNamed = {}, ...args: any[]) => tagFn(Object.assign({}, atDefaults, atNamed), ...args)
tag: (tagName: string, atDefaults = {}) => {
return (atNamed = {}, ...args: any[]) => tag(tagName, Object.assign({}, atDefaults, atNamed), ...args)
},
head: (atNamed: {}, ...args: any[]) => tag('head', atNamed, ...args),
title: (atNamed: {}, ...args: any[]) => tag('title', atNamed, ...args),
@ -80,7 +81,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