npm install @agentmark/templatedx
yarn add @agentmark/templatedx
import { transform } from '@agentmark/templatedx'; import MyTemplate from './my-template.mdx'; ... const props = { name: 'Jim' }; const result = stringify(await transform(MyTemplate, props));
import { transform, stringify, load } from '@puzzlet/templatedx'; const run = async (path: string) => { const mdx = await load('./example.mdx'); const props = { name: 'Jim' }; return stringify(await transform(parsed, myProps)); } run();