Skip to content
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

verify packed files #30

Open
shanewilson opened this issue Apr 25, 2020 · 2 comments · Fixed by #31
Open

verify packed files #30

shanewilson opened this issue Apr 25, 2020 · 2 comments · Fixed by #31

Comments

@shanewilson
Copy link
Owner

bin files included if declared and found
main file included if declared and found

  • main defaults to index.js when the module is required but index.js is not automatically included in pack

files defaults to [*] but really it is [**]

https://docs.npmjs.com/files/package.json#directories
directories is another way to add files - but doesn't really seem thought through so not going to support it for now.

dealing with .npmignore:
https://docs.npmjs.com/files/package.json#files

You can also provide a .npmignore file in the root of your package or in subdirectories, which will keep files from being included. At the root of your package it will not override the “files” field, but in subdirectories it will. The .npmignore file works just like a .gitignore. If there is a .gitignore file, and .npmignore is missing, .gitignore’s contents will be used instead.

whitelist = files array + main if declared and found + bin if declared and found
blacklist = .gitignore at root, .npmignore at each dir level.
dealing with .npmignore seems annoying.

blacklist seems annoying. Maybe leave this out for now. 🤷🏻‍♂️

@shanewilson shanewilson linked a pull request May 16, 2020 that will close this issue
@shanewilson
Copy link
Owner Author

npm has a package that gives an api for finding what files go in a pack - shoudl use that. Can't find it now though =\

@shanewilson
Copy link
Owner Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant