Inspired by zip-folder
to just zip a complete folder plain into a zip file I
recreated this project since zip-folder was very outdated and seemed not
to be maintained anymore. Also I added support for modern ES6 language
features like promises/async/await.
Install via npm
npm install zip-a-folder
const { zip } = require('zip-a-folder');
class ZipAFolder {
static async main() {
await zip('/path/to/the/folder', '/path/to/archive.zip');
}
}
ZipAFolder.main();
const zipFolder = require('zip-a-folder');
class ZipAFolder {
static main() {
zipFolder.zipFolder('/path/to/the/folder', '/path/to/archive.zip', function(err) {
if(err) {
console.log('Something went wrong!', err);
}
});
}
}
ZipAFolder.main();
Tests are written under test
and run by jest. To run the tests call npm test
.
- Special thanks to @sole for her initial work.
- Thanks to YOONBYEONGIN
- Thanks to ratbeard