zipfolder

1.0.4 • Public • Published

Zip a folder easily

Usage

  • zip a folder to current path

      var zip = require('zipfolder');
    
      // test-folder/ => test-folder.zip
      zip.zipFolder({folderPath: 'test-folder'}, function (err, path) {
         if (err) {
             console.log(err);
         } else {
             console.log(path);
         }
      });
    
  • zip a folder to other path

      // test-folder/ => output-folder/test-folder.zip
      zip.zipFolder({folderPath: 'test-folder', targetFolderPath: 'output-folder'}, function (err, path) {
          if (err) {
              console.log(err);
          } else {
              console.log(path);
          }
      });
    
  • use promise

      // use Q promise
      zip.zipFolder({folderPath: 'test-folder', targetFolderPath: 'output-folder'})
          .then(function (path) {
              console.log(path);
          }, function (err) {
              console.log(err);
          });
    

Dependencies (2)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i zipfolder

    Weekly Downloads

    1

    Version

    1.0.4

    License

    ISC

    Last publish

    Collaborators

    • laispace