simple-folder-zip
Simply zip a folder and all of its contents.
Last updated 2 months ago by ustlz .
MIT · Original npm · Tarball · package.json
$ cnpm install simple-folder-zip 
SYNC missed versions from official npm registry.

simple-folder-zip

Simply zip a folder and all of its contents, either programmatic or via CLI.

Installation

yarn global add simple-folder-zip
or
yarn add simple-folder-zip

Usage

CLI

USAGE
  $ page-icon-finder <source> [destination]

ARGUMENTS
  source        The folder you want to have Zipped
  destination  [default: current folder] The path where you want to save the ZIP file to

EXAMPLES
  $ simpleFolderZip <source> [destination]
  $ simpleFolderZip ./example/folder
  $ simpleFolderZip ./example/folder ~/example.zip

Programmatic

import simpleFolderZip from 'simple-folder-zip';

const source = '~/myAwesomeFolder';
const destination = './some/folder/example.zip';
  try {
    // If you do not pass a destination path,
    // the Zip will be placed in the current folder with the source folder as name
    const filesize = await simpleFolderZip(source, destination);
    console.log(`Total bytes: ${filesize}`)
  } catch (err) {
    console.error(err);
  }

Additionally you can pass ArchiverOptions to the function.

License

MIT

Current Tags

  • 1.1.0                                ...           latest (2 months ago)

3 Versions

  • 1.1.0                                ...           2 months ago
  • 1.0.1                                ...           2 months ago
  • 1.0.0                                ...           2 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (9)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |