packfiles
v0.0.2
Published
npm goggles: see what files npm sees
Downloads
8
Readme
packfiles
npm goggles for your package: see what files npm sees – tiny cli utility to list the files npm will include in its published tarball.
Tired of running npm pack
just so you can tar -tf <your-package>.tgz
to see the files included in the tarball? No longer!
installation
Install locally as a devDependency and run through an npm script or via npx:
$ npm install -D packfiles
$ npx packfiles
usage
Simplest usage is via npx
:
$ npx packfiles
But beware that you likely need to run npm run prepare
before packfiles such that you get an accurate view of the files that will exist during an npm publish flow.
example
how it works
Npm uses npm-packlist to determine the files that will be included in the package tarball.
This module takes into account all of npm's include/exclude rules (.gitignore
, .npmignore
, pkg.files
, etc).
packfiles
is simply a cli wrapper for npm-packlist that prints the list of files to STDOUT.
packfiles
relies on any build or compilation step already running.
So if your module is built via a prepare
script (which it probably should), you'll need to run npm run prepare
before running packfiles
.
See also npm scripts docs for information regarding correct usage of prepare
, publish
, pack
and all relevant pre/post variants (and prepublishOnly
)