-
Notifications
You must be signed in to change notification settings - Fork 125
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: update .npmignore to only publish relevant files #1377
Conversation
32a39a9
to
b852d77
Compare
.npmignore
Outdated
|
||
/FILES.md | ||
/CONTRIBUTING.md | ||
/MAINTAINERS.md |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one makes sense I think when published
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you mean MAINTAINERS ? or the 3 files ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just MAINTAINERS.md
"require": "./experimental/inline-mpd-parser.commonjs.js", | ||
"import": "./experimental/inline-mpd-parser.js", | ||
"default": "./experimental/inline-mpd-parser.js" | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:O you're right!
I changed the destination branch to go to |
Ok will rebase, I thought I targeted stable as a mistake and therefore change it to dev again 😄 |
b852d77
to
7c783c0
Compare
When publishing the rx-player package to npm, a lots of files are published, such as
src
folder or even some configuration files like.eslintrc.js
.Publishing such files seems to be irrelevant: this files are not used by an application because when an application is importing the library with
import RxPlayer from "rx-player"
, the files that are actually imported are listed in the propertyexports
property of thepackage.json
.Publishing unneeded files increase the weight of the package installed on the machine of a developper through
npm install
. It's also impact the "Unpacked Size" on the npm page of the repo: https://www.npmjs.com/package/rx-player/v/4.0.0-rc.1?activeTab=codeIt's currently 22MB large. Even if this metric doesn't express the real size of the bundle that an end user will have to download, application developers can have a wrong interpretation of this metric and may think that the RxPlayer library is
heavier than it really is, therefore it can eventually discourage them to use it because of it's weight.
The files that are required by an application using RxPlayer are built artefacts that reside in folder
/dist
.Having a
package.json
is also required.Other files are not necessary but provide useful informations and should be included in the package, this files are:
LICENSE
VERSION
CHANGELOG.md
README.md
This change means it's no longer possible to inspected source code with the code published to npm, it will not be possible either to run script such as test or lint on the installed package.
However, the source code can still be freely consulted on this repository, and we considered that it's our responsibility as maintainer to publish versions that are passing tests. Therefore applications should not have to test on their side that the library is passing tests.