fixed archiver right now

This commit is contained in:
Dolan Miu
2016-03-31 18:07:22 +01:00
parent a88a59fd51
commit 8af6262a83
3 changed files with 11 additions and 8 deletions

View File

@ -1,11 +1,11 @@
import {archiver, Zip} from "archiver";
import * as archiver from "archiver";
import * as fs from 'fs';
export class Packer {
protected archive: Zip;
protected archive: any;
constructor() {
this.archive = archiver.create("fgf", {});
this.archive = archiver.create("zip", {});
}
pack(output: fs.WriteStream): void {

View File

@ -1,5 +1,7 @@
/// <reference path="../typings/mocha/mocha.d.ts" />
/// <reference path="../typings/chai/chai.d.ts" />
/// <reference path="../typings/archiver/archiver.d.ts" />
import {LocalPacker} from "../export/packer/local";
import {assert} from "chai";

View File

@ -22,20 +22,21 @@ declare module "archiver" {
name?: string;
}
export interface Zip extends STREAM.Transform {
interface Archiver extends STREAM.Transform {
pipe(writeStream: FS.WriteStream): void;
append(readStream: FS.ReadStream, name: nameInterface): void;
finalize(): void;
bulk(mappings: any): void;
}
interface Options {
}
function archiver(format: string, options?: Options): Zip;
function archiver(format: string, options?: Options): Archiver;
export namespace archiver {
function create(format: string, options?: Options): Zip;
namespace archiver {
function create(format: string, options?: Options): Archiver;
}
export = archiver;
}