JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 126520
  • Score
    100M100P100Q156350F
  • License MIT

Zips up directories into buffers or saves zipped files to disk

Package Exports

  • zip-dir

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (zip-dir) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

zip-dir

Zips up a directory and saves the zip to disk or returns as a buffer.

Build Status

example

var zipdir = require('zip-dir');

zipdir('/path/to/be/zipped', function (err, buffer) {
  // `buffer` is the buffer of the zipped file
});

zipdir('/path/to/be/zipped', '~/myzip.zip', function (err, buffer) {
  // `buffer` is the buffer of the zipped file
  // And the buffer was saved to `~/myzip.zip`
});

methods

var zipdir = require('zip-dir');

zipdir(dirPath, [savePath], callback)

Zips up dirPath recursively preserving directory structure and returns the compressed buffer into callback on success. If savePath defined, the buffer will also be saved to disk at that path, with the callback also firing upon completion with the buffer.

install

$ npm install zip-dir

license

MIT