Skip to content

v0.10.2

Choose a tag to compare

@foo-ogawa foo-ogawa released this 01 Mar 03:03
· 74 commits to main since this release

What's New

format="js" support for inline datasources

Inline data blocks can now use format="js" to define data as JavaScript object literals, including template literal strings.

/*@embedoc-data:prompts format="js"*/{
  greeting: `Hello,
world!`,
  nested: {
    value: `multi-line
template literal`
  }
}/*@embedoc-data:end*/

This is useful when embedding data in TypeScript/JavaScript source files where strict JSON (double-quoted strings, no trailing commas) is impractical. The JS expression is evaluated at build time via new Function().