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

chore(package): use files in package.json instead of .npmignore #629

Open
GervinFung opened this issue May 11, 2022 · 4 comments
Open

chore(package): use files in package.json instead of .npmignore #629

GervinFung opened this issue May 11, 2022 · 4 comments

Comments

@GervinFung
Copy link

Motivation

It’s better to explicitly mention what should be packaged instead of listing everything that should not be included, as it requires more effort and it's possible to forget to add a new file/folder to .npmignore

Expected behavior

It will publish the files/folders that were whitelisted in package.json

@davidbonnet
Copy link
Owner

@GervinFung Thanks for this suggestion. Are there any files that shouldn't be in the package?

@GervinFung
Copy link
Author

GervinFung commented Jul 19, 2022

@GervinFung Thanks for this suggestion. Are there any files that shouldn't be in the package?

Hey, as of now I think it published what it should, except for .eslintrc.json, but that is ok, it's not a big issue. Just that I think it would be much easier to whitelist files/folders with package.json instead of blacklisting with .npmignore of what should not be published as you have to tally it manually.

For instance, if you whitelist with package.json, you only need to add bin, dist and astring.d.ts to files in package.json, it will automatically include what it needs like package.json itself, README.md and LICENSE

@davidbonnet
Copy link
Owner

Right, .eslintrc.json shouldn't be there.

@GervinFung
Copy link
Author

GervinFung commented Jul 20, 2022

If you are ok with it, I can create a PR that solve this issue by whitelisting what should be published instead

@davidbonnet davidbonnet removed the bug label Nov 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants