Reputation: 333
I have a solution where I have 2 .npmignore files. One packages only the bare essentials for creating a project. The second is one directory hire and is intended to include everything beneath it.
What appears to be happening is when publishing at the higher level the lower level .npmignore settings are used. This gives me the wrong package.
Is it possible to specify which .npmignore file to use or at least tell npm to ignore any .npmignore file not in the root directory of where the publish is occurring?
Thanks, Bob
Upvotes: 2
Views: 356
Reputation: 111
You can't specify which .npmignore file to use. Every one in your directory tree is used, like you have discovered. However, if you need specific files allowed/ignored you can specify relative paths.
Upvotes: 1