Add more content type files

This commit is contained in:
Dolan Miu
2018-02-03 20:56:20 +00:00
parent cfd3505414
commit 69707a7207
5 changed files with 55 additions and 3 deletions

View File

@ -46,6 +46,7 @@ export class Compiler {
const xmlFooter = xml(this.formatter.format(this.file.Footer.Footer));
const xmlHeaderRelationships = xml(this.formatter.format(this.file.Header.Relationships));
const xmlFooterRelationships = xml(this.formatter.format(this.file.Footer.Relationships));
const xmlContentTypes = xml(this.formatter.format(this.file.ContentTypes));
this.archive.append(xmlDocument, {
name: "word/document.xml",
@ -83,6 +84,10 @@ export class Compiler {
name: "word/_rels/footer1.xml.rels",
});
this.archive.append(xmlContentTypes, {
name: "[Content_Types].xml",
});
for (const data of this.file.Media.array) {
this.archive.append(data.stream, {
name: `word/media/${data.fileName}`,