Skip to content

Commit

Permalink
Adding more files to the package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
verlok committed Mar 29, 2024
1 parent ee1b763 commit 1c0d207
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,13 @@
},
"files": [
"dist",
"typings"
"typings",
".eslintrc.json",
"LICENSE",
"CHANGELOG.md",
"CODE_OF_CONDUCT.md",
"README.md",
"package.json"
],
"repository": {
"type": "git",
Expand Down

7 comments on commit 1c0d207

@XhmikosR
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@verlok what's the reason about this? The idea is that the npm package contains the least number of files needed for consumers and they are not meant for development or anything. That's why the GitHub repo exists.

@verlok
Copy link
Owner Author

@verlok verlok commented on 1c0d207 Mar 30, 2024 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@XhmikosR
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't get me wrong, but that is pretty much useless. Where did you see that?

I publish hundreds of npm packages and that thing doesn't even exist. In fact, it's pretty bad to include useless files in the npm.

@verlok
Copy link
Owner Author

@verlok verlok commented on 1c0d207 Mar 30, 2024 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@XhmikosR
Copy link

@XhmikosR XhmikosR commented on 1c0d207 Mar 30, 2024 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@erikyo
Copy link
Collaborator

@erikyo erikyo commented on 1c0d207 Mar 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was me to suggest @verlok to add the "missing" files to the npm package... 🫥

But that is the reason:
https://github.com/npm/feedback/discussions/66#discussioncomment-114779

(Although it shouldn't be) The quality score is influenced by certain parameters such as the presence of a readme or a licence within the package you download. In some cases it makes sense (like maybe the readme) and in others (the linter file for example) absolutely not.
But this, with at the cost of a minimal load (in the end it's just a few text files) allows you to come up higher in npm searches and practically everyone that publish on npm does it

@verlok
Copy link
Owner Author

@verlok verlok commented on 1c0d207 Mar 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reverted that because I agree on what @XhmikosR said, and the code quality shouldn’t be evaluated on the files you ship with npm install but on what’s in the git repository.

Please sign in to comment.