I've done several tests and was surprised by the several failed attempts to get files ignored in published package.
Removed the invalid existing .npmignore.
Merged the various .gitignores (from examples) into /.gitignore, but it didn't help. I don't understand why these entries are simply not taken into account by npm (tested v3.9.6 from node 5).
Used negate expressions in package.json files entry worked, although it goes against recommendation:
"The consequences are undefined" if you try to negate any of the files entries (that is, "!foo.js"). Please don't. Use .npmignore.
I've done several tests and was surprised by the several failed attempts to get files ignored in published package.
.npmignore
..gitignore
s (from examples) into/.gitignore
, but it didn't help. I don't understand why these entries are simply not taken into account bynpm
(tested v3.9.6 from node 5).https://github.com/npm/npm/wiki/Files-and-Ignores#details
PS: By the way, I used
tar -tf $(npm pack)
to test a publish, a workaround for a dry run.