1.0.1 • Published 5 years ago

@sjmeverett/zip-util v1.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
5 years ago

@sjmeverett/zip-util

Thin wrapper around archiver to output zip files, optionally with the file hash in the filename.

Installation

npm install -S @sjmeverett/zip-util

Usage

import { createZip } from "@sjmeverett/zip-util";

await createZip(
  "myzip",
  (archive) => {
    archive.directory("source", "dest");
  },
  { destinationDir: "dest/dir", hash: true }
);

The callback function receives one argument, archive, which is an instance of archiver. It can return a promise if necessary, which will be awaited.

1.0.1

5 years ago

1.0.0

5 years ago