@taskr/zip
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
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
See also
taskr(3), clsx(3), @polka/cluster(3), @pwa/cli(3), uvu(3), sockette(3), klona(3), kleur(3), dequal(3), sirv-cli(3)