Repository navigation
v0.10.2
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().