Category : archiverjs

I am trying to replicate the functionality of the following shell command using archiverJS, in my application. zip -r archiveName * this is how I am doing it currently:- const targetArchiveFile = fs.createWriteStream(`${rootFolder}/${zipFileName}.zip`); const archive = archiver(‘zip’, { zlib: { level: 9 }, }); archive.pipe(targetArchiveFile); archive.on(‘error’, function (error) { throw error; }); archive.glob(‘**/!(*.zip)’, { cwd: ..

Read more