add simple demo page

This commit is contained in:
Dolan Miu
2017-03-12 21:34:49 +00:00
parent bf22866a8d
commit f17360d45a
4 changed files with 19 additions and 3 deletions

View File

@ -18,7 +18,7 @@ export class ExpressPacker extends Packer {
}
public pack(name: string): void {
this.res.attachment(name + ".docx");
this.res.attachment(`${name}.docx`);
super.pack(this.res);
}
}

View File

@ -13,7 +13,7 @@ export class LocalPacker extends Packer {
}
public pack(path: string): void {
this.stream = fs.createWriteStream(path);
this.stream = fs.createWriteStream(`${path}.docx`);
super.pack(this.stream);
}
}