Skip to main content
Follow the instructions below to install TemplateDX in your app.

Install TemplateDX

Install with npm:
npm
npm install @agentmark/templatedx
or yarn:
npm
yarn add @agentmark/templatedx

Use TemplateDX

import { transform } from '@agentmark/templatedx';
import MyTemplate from './my-template.mdx';
...
const props = { name: 'Jim' };
const result = stringify(await transform(MyTemplate, props));

Node

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();