libnpmpack
Programmatic API for the bits behind npm pack
Last updated 6 months ago by lukekarrys .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ npm install libnpmpack 
SYNC missed versions from official npm registry.

libnpmpack

npm version license CI - libnpmpack

libnpmpack is 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, libnpmpack will also run the prepack and postpack lifecycles.

Table of Contents

Example

const pack = require('libnpmpack')

Install

$ npm install libnpmpack

API

> pack(spec, [opts]) -> Promise

Packs a tarball from a local directory or from a registry or github spec and returns a Promise that resolves to the tarball data Buffer, with from, resolved, and integrity fields attached.

If no options are passed, the tarball file will be saved on the same directory from which pack was called in.

libnpmpack uses pacote. Most options are passed through directly to that library, so please refer to its own opts documentation for options that can be passed in.

Examples
// 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('abbrev@1.0.3')

// packs from a github spec
const githubTar = await pack('isaacs/rimraf#PR-192')

Current Tags

  • 5.0.21                                ...           backport (9 months ago)
  • 8.0.0                                ...           latest (a month ago)
  • 6.0.0-pre.0                                ...           prerelease (a year ago)

58 Versions

  • 8.0.0                                ...           a month ago
  • 7.0.4                                ...           4 months ago
  • 7.0.3                                ...           6 months ago
  • 7.0.2                                ...           6 months ago
  • 7.0.1                                ...           6 months ago
  • 7.0.0                                ...           7 months ago
  • 6.0.9                                ...           7 months ago
  • 6.0.8                                ...           7 months ago
  • 6.0.7                                ...           9 months ago
  • 5.0.21                                ...           9 months ago
  • 6.0.6                                ...           10 months ago
  • 6.0.5                                ...           10 months ago
  • 6.0.4                                ...           a year ago
  • 6.0.3                                ...           a year ago
  • 5.0.20                                ...           a year ago
  • 6.0.2                                ...           a year ago
  • 6.0.1                                ...           a year ago
  • 6.0.0                                ...           a year ago
  • 6.0.0-pre.0                                ...           a year ago
  • 5.0.19                                ...           a year ago
  • 5.0.18                                ...           a year ago
  • 5.0.17                                ...           2 years ago
  • 5.0.16                                ...           2 years ago
  • 5.0.15                                ...           2 years ago
  • 5.0.14                                ...           2 years ago
  • 5.0.13                                ...           2 years ago
  • 5.0.12                                ...           2 years ago
  • 5.0.11                                ...           2 years ago
  • 5.0.10                                ...           2 years ago
  • 5.0.9                                ...           2 years ago
  • 5.0.8                                ...           2 years ago
  • 5.0.7                                ...           2 years ago
  • 5.0.6                                ...           2 years ago
  • 5.0.5                                ...           2 years ago
  • 5.0.4                                ...           2 years ago
  • 5.0.3                                ...           2 years ago
  • 5.0.2                                ...           2 years ago
  • 5.0.1                                ...           2 years ago
  • 5.0.0                                ...           2 years ago
  • 5.0.0-pre.4                                ...           2 years ago
  • 5.0.0-pre.3                                ...           2 years ago
  • 5.0.0-pre.2                                ...           2 years ago
  • 5.0.0-pre.1                                ...           2 years ago
  • 5.0.0-pre.0                                ...           2 years ago
  • 4.1.3                                ...           2 years ago
  • 4.1.2                                ...           2 years ago
  • 4.1.1                                ...           2 years ago
  • 4.1.0                                ...           2 years ago
  • 4.0.3                                ...           3 years ago
  • 4.0.2                                ...           3 years ago
  • 4.0.1                                ...           3 years ago
  • 4.0.0                                ...           3 years ago
  • 3.1.0                                ...           3 years ago
  • 3.0.1                                ...           3 years ago
  • 3.0.0                                ...           3 years ago
  • 2.0.1                                ...           4 years ago
  • 2.0.0                                ...           5 years ago
  • 1.0.0                                ...           5 years ago
Downloads
Total 0
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (4)
Dev Dependencies (5)
Dependents (2)

© 2010 - cnpmjs.org x YWFE | Home | YWFE