// process a template that uses the default symbol ($)

import { CreateDocx } from "../../../build";
import * as fs from "fs";

const docxTemplate = fs.readFileSync("../../files/TemplateVariables.docx");

const docx = new CreateDocx();
// load the template
docx.openTemplate(docxTemplate).then(docx => {
    docx.processTemplate();
    docx.save().then(contents => {
        fs.writeFileSync("processTemplate_1.docx", Buffer.from(contents));
    });
});
