From 6637a0cc6071394d576222ff9527cc01cdb3a4b8 Mon Sep 17 00:00:00 2001 From: Lorenzo Millucci Date: Sun, 21 Oct 2018 11:53:51 +0200 Subject: [PATCH] add `templateOptions` to pass options to templater --- index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/index.js b/index.js index 06a142f..b4d1824 100644 --- a/index.js +++ b/index.js @@ -24,10 +24,12 @@ const generateDocx = async options => { const template = await readFile(options.template.filePath, 'binary') const zip = new JSzip(template) + const templateOptions = options.templateOptions || {} const document = new Docxtemplater() .loadZip(zip) .setData(options.template.data) + .setOptions(templateOptions) .render() const buf = document