JSPM

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

Forked the idea of @sole to zip a complete folder into a zip file but now using promises

Package Exports

  • zip-a-folder

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-a-folder) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

NPM

Build Coverage Status Dependencies Known Vulnerabilities

zip-a-folder

Inspired by zip-folder to just zip a complete folder plain into a zip file I recreated this project since zip-folder was very outdated and seemed not to be maintained anymore. Also I added support for modern ES6 language features like promises/async/await.

Basic Usage

Install via npm

npm install zip-a-folder

Promised Usage

const zip-a-folder = require('zip-a-folder');

class ZipAFolder {

    static async main() {
        await zip-a-folder.zip('/path/to/the/folder', '/path/to/archive.zip');
    }
}

ZipAFolder.main();

Callback Usage

const zipFolder = require('zip-a-folder');

class ZipAFolder {

    static main() {
        zipFolder.zipFolder('/path/to/the/folder', '/path/to/archive.zip', function(err) {
            if(err) {
                console.log('Something went wrong!', err);
            }
        });
    }
}

ZipAFolder.main();

Tests

Tests are written under test and run by jest. To run the tests call npm test.

Thanks

  • Special thanks to @sole for her initial work.