2016-03-31 18:03:16 +01:00
|
|
|
import {Packer} from "./packer";
|
|
|
|
import * as fs from 'fs';
|
2016-03-31 23:36:42 +01:00
|
|
|
import {Document} from "../../docx/document";
|
2016-04-05 01:49:12 +01:00
|
|
|
import {Properties} from "../../properties";
|
2016-03-31 18:03:16 +01:00
|
|
|
|
|
|
|
export class LocalPacker extends Packer {
|
|
|
|
private stream: fs.WriteStream
|
|
|
|
|
2016-04-05 01:49:12 +01:00
|
|
|
constructor(document: Document, style: any, properties: Properties, path: string) {
|
2016-04-05 06:03:04 +01:00
|
|
|
super(document, style, properties);
|
2016-03-31 18:03:16 +01:00
|
|
|
this.stream = fs.createWriteStream(path);
|
|
|
|
}
|
|
|
|
|
|
|
|
pack() {
|
|
|
|
super.pack(this.stream);
|
|
|
|
}
|
|
|
|
}
|