Socket
Book a DemoInstallSign in
Socket

@taskr/zip

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@taskr/zip

ZIP compress files with taskr

latest
Source
npmnpm
Version
1.1.0
Version published
Maintainers
1
Created
Source

@taskr/zip npm

ZIP compress files with Taskr.

Install

$ npm install --save-dev @taskr/zip

Usage

This example will produce releases/Archive.zip, containing all contents within the dist directory:

// Option 1
exports.zip = function * (task) {
  yield task.source('dist/**/*').zip({ file:'Archive.zip' }).target('releases');
}
//=> only writes ZIP file to 'releases' dir

// Option 2
exports.zip = function * (task) {
  yield task.source('dist/**/*').zip({
    file: 'Archive.zip',
    dest: '.'
  }).target('releases');
}
//=> writes all files to 'releases'
//=> also writes ZIP file to root dir

API

.zip(options)

options.dest

Type: string
Default: null

If specified, is an alternate directory wherein the ZIP file should be placed. This should only be used if you'd like to write to a location other than your task.target() location.

Important: By providing a dest value, the files from task.source() will be preserved and remain accessible within the task-chain!

options.file

Type: string
Default: 'archive.zip'

The name of your ZIP file. It must include .zip.

Support

Any issues or questions can be sent to the Taskr monorepo.

Please be sure to specify that you are using @taskr/zip.

License

MIT © Luke Edwards

Keywords

taskr

FAQs

Package last updated on 27 Jul 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts