Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
.travis.yml
LICENSE
README.md
index.js
package.json

README.md

npmd-pack

Pack a directory into a tarball stream.

This code is mostly pulled out of npm and fstream-npm does most of the work. The only departure from the way that npm does it is to always set the timestamps to 0.

This is important to security (and thus to distribution), because it means it's possible to verify an installed package by repacking it. (although, this will unfortunately only be possible if packed with with npmd-pack)

Example

var pack = require('npmd-pack')

pack(process.cwd(), {})
  .pipe(fs.createWriteStream('../tarball.tgz'))

opts are passed through to tar

License

MIT

Something went wrong with that request. Please try again.