New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it not possible to test .npmignore using this library? #61
Comments
I noticed that the docs say:
That's great and everything about better accuracy for .gitignore files. Perhaps NPM deviates somewhat from this standard, by using If not, please document more clearly that this library is useless with |
So the answer is NO (, it is not possible). PS: I suggest to always use field |
Would you consider implementing support for NPM rules as an option? Maybe it is not a difficult enhancement to make. Alternatively, perhaps the README.md could have a disclaimer making this limitation more clear? |
This problem is easily solved by inverting the ignore expressions. Our files generally look like this:
This same solution also works for other files like The package.json
|
If you read the .gitignore spec carefully, you will figure out that npmignore is completely a different story. For npmignore, you could use minimatch (for just pattern parsing) or fstream-ignore (with file system)
Yes |
👍 Thanks! |
I have an
.npmignore
file like this:When I do
npm pack
, NPM selects everything under the "dist" folder.Whereas node-ignore does not seem to reflect this behavior:
The text was updated successfully, but these errors were encountered: