Remove TemplatedFile

This commit is contained in:
Dolan
2018-09-19 23:04:34 +01:00
parent e6d4741955
commit 10114bb12d
9 changed files with 292 additions and 624 deletions

View File

@ -1,5 +1,5 @@
import * as fs from "fs";
import { ImportDocx, Packer, Paragraph, TemplatedDocument } from "../build";
import { ImportDocx, Packer, Paragraph, Document } from "../build";
const importDocx = new ImportDocx();
const filePath = "./demo/dotx/template.dotx";
@ -15,7 +15,9 @@ fs.readFile(filePath, (err, data) => {
titlePage: true,
} as any;
const doc = new TemplatedDocument(templateDocument, undefined, sectionProps);
const doc = new Document(undefined, sectionProps, {
template: templateDocument
});
const paragraph = new Paragraph("Hello World");
doc.addParagraph(paragraph);