@taskr/zip
v1.1.0
Published
ZIP compress files with taskr
Maintainers
Readme
@taskr/zip 
ZIP compress files with Taskr.
Install
$ npm install --save-dev @taskr/zipUsage
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 dirAPI
.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
destvalue, the files fromtask.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
