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