How to use tarr - 2 common examples

To help you get started, we’ve selected a few tarr 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 sintaxi / surge / lib / middleware / deploy.js View on Github external
}
      helpers.log()
      process.exit(1)
      // console.log(rsp.statusCode)
    }
  })

  // Read Project
  var project = fsReader({ 'path': req.project, ignoreFiles: [".surgeignore"] })

  // we always ignore .git directory
  project.addIgnoreRules(ignore)

  // chain all this together...
  project
    .pipe(tar.Pack())
    .pipe(zlib.Gzip())
    .pipe(handshake)

}
github sintaxi / surge / lib / middleware / prep.js View on Github external
module.exports = function(req, next){
  var pack = tar.Pack()
  var zip = zlib.Gzip()
  var project = fsReader({ 'path': req.project, ignoreFiles: [".surgeignore"] })
  project.addIgnoreRules(ignore)

  req.tarballPath = path.resolve("/tmp/", Math.random().toString().split(".")[1] + ".tar")

  var tarball = fs.createWriteStream(req.tarballPath)

  tarball.on("finish", function(e){
    next()
  })

  project.pipe(pack).pipe(zip).pipe(tarball)
}

tarr

tarr for node

ISC
Latest version published 5 years ago

Package Health Score

60 / 100
Full package analysis

Popular tarr functions