How to use the node-7z.add function in node-7z

To help you get started, we’ve selected a few node-7z 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 dreamnettech / dreampower / scripts / release.js View on Github external
function zip() {
  console.log('Compressing build...')
  process.chdir(buildPath)

  const def = new Deferred()

  const sevenProcess = Seven.add(filePath, '*', {
    recursive: true
  })

  sevenProcess.on('error', (err) => {
    def.reject(err)
  })

  sevenProcess.on('end', (info) => {
    def.resolve()
  })

  return def.promise
}
github poooi / poi / build / utils.es View on Github external
export const compress7z = async (files, archive, options) => {
  options = {
    ...options,
    $bin: pathTo7zip,
  }
  try {
    await fs.remove(archive)
  } catch (e) {
    console.error(e.stack)
  }
  await Seven.add(archive, files, options)
}

node-7z

A Node.js wrapper for 7-Zip with platform binaries

ISC
Latest version published 3 years ago

Package Health Score

53 / 100
Full package analysis

Popular node-7z functions