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
Only publish relevant files to npm #79
Comments
Can you elaborate as to why this would be better? |
The And why would I, as a consumer of your library, be interested in any other files than the ones I consume? You don't ship your tests to your clients, do you? |
The size I care about is the change in the runtime assets of the consuming project that a library contributes to (~172 bytes in this case). I don't see lots of tiny files/folders in
You may be interested in looking at tests, as it's one of the most accurate sources of information for learning about what a piece of code is designed to do You may be interested in the original source code, so you can make changes to the original You may even be interested a library's So there are very tangible benefits to including these -- I've saved my consumers the trouble of finding the source code, going to a particular version, making sure that it aligns with what was actually published to NPM, etc... |
When this package is published to npm, it currently includes the whole project.
A better solution is to only include the relevant files, which in this case should only be
index.ts
.This can be achieved by setting the
files
property inpackage.json
The text was updated successfully, but these errors were encountered: