Cross-platform .zip file creation
npm install cross-zip[ci-image]: https://img.shields.io/github/workflow/status/feross/cross-zip/ci/master
[ci-url]: https://github.com/feross/cross-zip/actions
[npm-image]: https://img.shields.io/npm/v/cross-zip.svg
[npm-url]: https://npmjs.org/package/cross-zip
[downloads-image]: https://img.shields.io/npm/dm/cross-zip.svg
[downloads-url]: https://npmjs.org/package/cross-zip
[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg
[standard-url]: https://standardjs.com
```
npm install cross-zip
`js
var zip = require('cross-zip')
var inPath = path.join(__dirname, 'myFolder') // folder to zip
var outPath = path.join(__dirname, 'myFile.zip') // name of output zip file
zip.zipSync(inPath, outPath)
`
Zip the folder at inPath and save it to a .zip file at outPath. If a callbackError
is passed, then it is called with an or null.
Sync version of zip.zip.
Unzip the .zip file at inPath into the folder at outPath. If a callback isError
passed, then it is called with an or null.
Sync version of zip.unzip.
This package requires .NET Framework 4.5 or later
and Powershell 3.
These come pre-installed on Windows 8 or later.
On Windows 7 or earlier, you will need to install these manually in order for
cross-zip` to function correctly.
- Stack Overflow - zipping from command line in Windows
- cross-zip-cli: CLI version of cross-zip.
MIT. Copyright (c) Feross Aboukhadijeh.