Fix Prettier styling changes

This commit is contained in:
Dolan
2018-02-05 01:44:28 +00:00
parent fd93c0776a
commit ce7ef30806
2 changed files with 57 additions and 14 deletions

View File

@ -20,13 +20,28 @@ export class ContentTypes extends XmlComponent {
this.root.push(new Default("application/vnd.openxmlformats-package.relationships+xml", "rels"));
this.root.push(new Default("application/xml", "xml"));
this.root.push(new Default("application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml", undefined, "/word/document.xml"));
this.root.push(new Default("application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml", undefined, "/word/header1.xml"));
this.root.push(new Default("application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml", undefined, "/word/footer1.xml"));
this.root.push(new Default("application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml", undefined, "/word/styles.xml"));
this.root.push(
new Default(
"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml",
undefined,
"/word/document.xml",
),
);
this.root.push(
new Default("application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml", undefined, "/word/header1.xml"),
);
this.root.push(
new Default("application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml", undefined, "/word/footer1.xml"),
);
this.root.push(
new Default("application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml", undefined, "/word/styles.xml"),
);
this.root.push(new Default("application/vnd.openxmlformats-package.core-properties+xml", undefined, "/docProps/core.xml"));
this.root.push(new Default("application/vnd.openxmlformats-officedocument.extended-properties+xml", undefined, "/docProps/app.xml"));
this.root.push(new Default("application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml", undefined, "/word/numbering.xml"));
this.root.push(
new Default("application/vnd.openxmlformats-officedocument.extended-properties+xml", undefined, "/docProps/app.xml"),
);
this.root.push(
new Default("application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml", undefined, "/word/numbering.xml"),
);
}
}

View File

@ -40,18 +40,46 @@ export class File {
this.coreProperties = new CoreProperties(options);
this.numbering = new Numbering();
this.docRelationships = new Relationships();
this.docRelationships.createRelationship(1, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles", "styles.xml");
this.docRelationships.createRelationship(2, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering", "numbering.xml");
this.docRelationships.createRelationship(3, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header", "header1.xml");
this.docRelationships.createRelationship(4, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer", "footer1.xml");
this.docRelationships.createRelationship(
1,
"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",
"styles.xml",
);
this.docRelationships.createRelationship(
2,
"http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering",
"numbering.xml",
);
this.docRelationships.createRelationship(
3,
"http://schemas.openxmlformats.org/officeDocument/2006/relationships/header",
"header1.xml",
);
this.docRelationships.createRelationship(
4,
"http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer",
"footer1.xml",
);
this.media = new Media();
this.headerWrapper = new HeaderWrapper(this.media);
this.footerWrapper = new FooterWrapper(this.media);
this.contentTypes = new ContentTypes();
this.fileRelationships = new Relationships();
this.fileRelationships.createRelationship(1, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument", "word/document.xml");
this.fileRelationships.createRelationship(2, "http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties", "docProps/core.xml");
this.fileRelationships.createRelationship(3, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties", "docProps/app.xml");
this.fileRelationships.createRelationship(
1,
"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",
"word/document.xml",
);
this.fileRelationships.createRelationship(
2,
"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",
"docProps/core.xml",
);
this.fileRelationships.createRelationship(
3,
"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties",
"docProps/app.xml",
);
}
public addParagraph(paragraph: Paragraph): void {