smart-zip
You can zip and unzip files, when you zip you can pass a regular expression to exclude files from zip, each file matched at regex will not be inserted at zip file.
You can choose create top folder or not with the parameter.
Work on windows and ios (not tested on linux but i believe it's work to).
- Usage
- Generate zip without top folder
- Generate zip with top folder
- Unzip the files
- Unzip from stream
- News
Usage
npm install smart-zip
Generate zip without top folder
var smartZip = ; // Use to don't put files into .zip, each match won't be inserted into .zipvar regexExcludes = 'index.html'; // Generate zip without top foldersmartZip;
Generate zip with top folder
var smartZip = ; // Use to don't put files into .zip, each match won't be inserted into .zipvar regexExcludes = 'index.html'; // Generate zip with top foldersmartZip;
Unzip the files
var smartZip = ; // Unzip the filessmartZip;
Unzip from stream
var smartZip = ;var fs = ; // Unzip from streamvar zipFileStream = fs;smartZip;
News
- 0.0.8 Added support to unzip from stream.
- 0.0.9 Added support to ignore folders as well.
Thanks