work on archiver

This commit is contained in:
Dolan Miu
2016-03-31 18:03:16 +01:00
parent 5fa1c259d0
commit a88a59fd51
5 changed files with 59 additions and 9 deletions

View File

@ -1,5 +1,22 @@
import * as archiver from "archiver";
import {archiver, Zip} from "archiver";
import * as fs from 'fs';
export class Packer {
protected archive: Zip;
constructor() {
this.archive = archiver.create("fgf", {});
}
pack(output: fs.WriteStream): void {
this.archive.pipe(output);
this.archive.bulk([
{
expand: true,
cwd: __dirname + '/template',
src: ['**', '**/.rels']
}
]);
}
}