libnpmpackis a Node.js library for programmatically packing tarballs from a local directory or from a registry or github spec. If packing from a local source,
libnpmpackwill also run the
Table of Contents
const pack = require('libnpmpack')
$ npm install libnpmpack
If no options are passed, the tarball file will be saved on the same directory from which
packwas called in.
pacote. Most options are passed through directly to that library, so please refer to its own
optsdocumentation for options that can be passed in.
// packs from cwd const tarball = await pack() // packs from a local directory const localTar = await pack('/Users/claudiahdz/projects/my-cool-pkg') // packs from a registry spec const registryTar = await pack('email@example.com') // packs from a github spec const githubTar = await pack('isaacs/rimraf#PR-192')