Instead of blacklisting unwanted files for npm packing (.npmignore), whitelist wanted ones. Blacklisting, by nature, can easily result in unwanted files getting packed. Case in point, the package currently contains the following files:
About the files key in package.json: files such as the readme get packed by default, see https://docs.npmjs.com/files/package.json#files. Testing which files are going to be packed can be done using npm pack.
Instead of blacklisting unwanted files for npm packing (.npmignore), whitelist wanted ones. Blacklisting, by nature, can easily result in unwanted files getting packed. Case in point, the package currently contains the following files:
About the
files
key inpackage.json
: files such as the readme get packed by default, see https://docs.npmjs.com/files/package.json#files. Testing which files are going to be packed can be done usingnpm pack
.