Merge branch 'master' into feat/improve-docs

This commit is contained in:
Dolan
2019-01-03 20:56:05 +00:00
3 changed files with 6 additions and 6 deletions

View File

@ -17,7 +17,7 @@ describe("Compiler", () => {
describe("#compile()", () => {
it("should pack all the content", async function() {
this.timeout(99999999);
const zipFile = await compiler.compile(file);
const zipFile = compiler.compile(file);
const fileNames = Object.keys(zipFile.files).map((f) => zipFile.files[f].name);
expect(fileNames).is.an.instanceof(Array);
@ -46,7 +46,7 @@ describe("Compiler", () => {
this.timeout(99999999);
const zipFile = await compiler.compile(file);
const zipFile = compiler.compile(file);
const fileNames = Object.keys(zipFile.files).map((f) => zipFile.files[f].name);
expect(fileNames).is.an.instanceof(Array);

View File

@ -36,7 +36,7 @@ export class Compiler {
this.imageReplacer = new ImageReplacer();
}
public async compile(file: File): Promise<JSZip> {
public compile(file: File): JSZip {
const zip = new JSZip();
const xmlifiedFileMapping = this.xmlifyFile(file);

View File

@ -9,7 +9,7 @@ export class Packer {
}
public async toBuffer(file: File): Promise<Buffer> {
const zip = await this.compiler.compile(file);
const zip = this.compiler.compile(file);
const zipData = (await zip.generateAsync({
type: "nodebuffer",
mimeType: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
@ -19,7 +19,7 @@ export class Packer {
}
public async toBase64String(file: File): Promise<string> {
const zip = await this.compiler.compile(file);
const zip = this.compiler.compile(file);
const zipData = (await zip.generateAsync({
type: "base64",
mimeType: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
@ -29,7 +29,7 @@ export class Packer {
}
public async toBlob(file: File): Promise<Blob> {
const zip = await this.compiler.compile(file);
const zip = this.compiler.compile(file);
const zipData = (await zip.generateAsync({
type: "blob",
mimeType: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",