archive error handling

This commit is contained in:
Dolan Miu
2016-03-31 19:04:54 +01:00
parent c44ff2b28a
commit 8303fb16ea

View File

@ -6,6 +6,10 @@ export class Packer {
constructor() { constructor() {
this.archive = archiver.create("zip", {}); this.archive = archiver.create("zip", {});
this.archive.on('error', (err) => {
throw err;
});
} }
pack(output: fs.WriteStream): void { pack(output: fs.WriteStream): void {
@ -18,5 +22,9 @@ export class Packer {
src: ['**', '**/.rels'] src: ['**', '**/.rels']
} }
]); ]);
//this.archive.directory(__dirname + "/template", "/");
this.archive.finalize();
} }
} }