How to use the archiver.once function in archiver

To help you get started, we’ve selected a few archiver examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github patr0nus / DeskGap / scripts / archive-node-static-lib.js View on Github external
const nodeVersion = require('../npm/node-version');
const path = require('path');
const fs = require('fs');

const archive = require('archiver')('zip', {
    zlib: { level: require('zlib').constants.Z_BEST_COMPRESSION }
}).once('warning', (err) => {
    throw err;
});

const nodeSrcFolder = path.resolve(__dirname, '..', 'deps', 'node');

switch (process.platform) {
case 'darwin':
	archive.glob('out/Release/*.a', {
	    cwd: nodeSrcFolder,
	});
	break;
case 'linux':
	archive.glob('out/Release/obj.target/**/@(*.a|*.o)', {
	    cwd: nodeSrcFolder,

archiver

a streaming interface for archive generation

MIT
Latest version published 2 months ago

Package Health Score

88 / 100
Full package analysis