Files
docx-js/ts/export/packer/local.ts

18 lines
557 B
TypeScript
Raw Normal View History

2016-03-31 18:03:16 +01:00
import {Packer} from "./packer";
2016-05-26 15:08:34 +01:00
import * as fs from "fs";
import {Document} from "../../docx/document";
2016-04-05 01:49:12 +01:00
import {Properties} from "../../properties";
2016-05-23 22:23:05 +01:00
import {Numbering} from "../../numbering";
2016-03-31 18:03:16 +01:00
export class LocalPacker extends Packer {
2016-05-26 15:08:34 +01:00
private stream: fs.WriteStream;
2016-07-04 18:47:13 +01:00
constructor(document: Document, styles?: any, properties?: Properties, numbering?: Numbering) {
super(document, styles, properties, numbering);
2016-03-31 18:03:16 +01:00
}
2016-05-26 15:08:34 +01:00
2016-07-04 18:47:13 +01:00
pack(path: string): void {
this.stream = fs.createWriteStream(path);
2016-05-26 15:08:34 +01:00
super.pack(this.stream);
}
2016-03-31 18:03:16 +01:00
}