zipfolder
Zip a folder.
Last updated 6 years ago by laispace .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install zipfolder 
SYNC missed versions from official npm registry.

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);
          });
    

Current Tags

  • 1.0.0                                ...           1.0.0 (6 years ago)
  • 1.0.4                                ...           latest (6 years ago)

5 Versions

  • 1.0.4                                ...           6 years ago
  • 1.0.3                                ...           6 years ago
  • 1.0.2                                ...           6 years ago
  • 1.0.1                                ...           6 years ago
  • 1.0.0                                ...           6 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 2
Last Month 3
Dependencies (2)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |