https://github.com/tpkn/zfolder
Zip all files inside folder
https://github.com/tpkn/zfolder
Last synced: 6 months ago
JSON representation
Zip all files inside folder
- Host: GitHub
- URL: https://github.com/tpkn/zfolder
- Owner: tpkn
- License: mit
- Created: 2019-03-16T17:25:33.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-09-01T00:55:05.000Z (almost 7 years ago)
- Last Synced: 2025-02-15T15:07:00.794Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 12.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ZFolder [](https://www.npmjs.org/package/zfolder)
Zip all files inside folder
Node module that recursively zips files inside given folder.
## Installation
```bash
npm install zfolder
```
## API
```javascript
await ZFolder(folder[, zip_path, options])
```
### folder
**Type**: _String_
### zip_path
**Type**: _String_
### options
**Type**: _Object_
- `filter` <_Object_> | <_Function_> Filter some files. For more details [check ReadDirRec](https://www.npmjs.com/package/readdirrec#optionsfilter) module settings
- `recursive` <_Boolean_> If `false`, then nested files would be ignored. `true` by default
### @return
**Type**: _Object_
Returns path to zip-archive and total zipped files
```
{
path: Z:/ ... /test.zip,
}
```
## Usage
```javascript
const ZFolder = require('zfolder');
let result = await ZFolder('./test/');
```
## Changelog
#### v1.1.0 (2019-03-16):
- added option to `filter` files inside the folder