Page 1 of 1

Milo DSL - Create EOS Webteases with TypeScript

Posted: Thu Apr 16, 2026 12:38 am
by Yaquiluna
Milo DSL
logo.png
logo.png (71.63 KiB) Viewed 2050 times
MiloDSL is a TypeScript DSL that allows developers to write Milovana EOS Webteases with TypeScript instead of using the EOS Editor.

Features:
  • Typed command builders. Invalid combos like say("hi", { mode: "instant", duration: ... }) do not compile.
  • Typed page references. goto(someOtherPage) is checked at compile time, misspellings fail before upload.
  • Embedded JS via the js`...` template.
  • Exports to EOS Editor JSON which can easily be imported via the EOS Editor Backup feature.
  • Assets by content hash. gallery(...).image(hash) resolves against a EOS export, so the IDs are instantly correct.
  • Multi package manager support. Installable with npm, bun, or pnpm. Ships a CLI that runs under both Node and Bun.

Install from GitHub (not on npm yet):

Code: Select all

npm install github:YaquilunaDev/milo-dsl                                                                                                                                                                                                                                                                                             
# or: bun add github:YaquilunaDev/milo-dsl && bun pm trust milo-dsl
Tiny Code example

Code: Select all

import {
  build, defineStory, end, goto, html, ifCmd,
  js, page, prompt, say, variable,
} from "milo-dsl";

const name = variable<string>("name");

const bye = page("bye", [say(html.p("Goodbye, ", html.evalVar(name))), end()]);
const start = page("start", [
  prompt(name),
  say(html.p("Hello, ", html.evalVar(name), "!")),
  ifCmd(js`${name} == "stop"`, [goto(bye)], [say("Welcome back.")]),
]);

export default defineStory({ variables: [name], pages: [start, bye] });
Links

Re: Milo DSL - Create EOS Webteases with TypeScript

Posted: Thu Apr 16, 2026 10:53 am
by kerkersklave
Nice work, should make complex teases a lot easier to write.

Re: Milo DSL - Create EOS Webteases with TypeScript

Posted: Thu Apr 16, 2026 5:15 pm
by Millibelle
This is incredible! I never wrote a tease myself, mostly because couldn't take the time to learn everything about the EOS editor. But I know typescript, and the api you designed seems logical enough to learn it easily. I wish I could star the repo more than once!

Re: Milo DSL - Create EOS Webteases with TypeScript

Posted: Fri Apr 17, 2026 7:51 pm
by seraph0x
Very cool, thanks for the contribution! :smile: