Make compiler take in a file

This commit is contained in:
Dolan
2017-12-15 02:15:44 +00:00
parent d19ff1e300
commit 742e2b5089
6 changed files with 76 additions and 68 deletions

View File

@ -2,11 +2,7 @@ import * as fs from "fs";
import * as os from "os";
import * as path from "path";
import { Document } from "../../docx/document";
import { Media } from "../../media";
import { Numbering } from "../../numbering";
import { Properties } from "../../properties";
import { Styles } from "../../styles";
import { File } from "../../docx";
import { Compiler } from "./compiler";
import { IPacker } from "./packer";
import { PdfConvertWrapper } from "./pdf-convert-wrapper";
@ -16,9 +12,9 @@ export class LocalPacker implements IPacker {
private pdfConverter: PdfConvertWrapper;
private packer: Compiler;
constructor(document: Document, styles?: Styles, properties?: Properties, numbering?: Numbering, media?: Media) {
constructor(file: File) {
this.pdfConverter = new PdfConvertWrapper();
this.packer = new Compiler(document, styles, properties, numbering, media);
this.packer = new Compiler(file);
}
public async pack(filePath: string): Promise<void> {