-
Notifications
You must be signed in to change notification settings - Fork 52
Ensure the project readme is deployed to NPM also #523
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Curious, why such a complication and why not put it in the root of the repository as usual? I think the files inside the ".github" directory only relate to the Github configuration and README is needed for documentation regardless of the provider. What don't I know?
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.
Same discussion we had about the configs, I just prefer as much to not be in the root directory as possible and
.githubis one of three places it can't be kept, so it's grouped with other related documents. Besides, the pre and post setup is standard to NPM itself and so works well for the use case anyway since it's only an issue for NPM deployments anyway.Uh oh!
There was an error while loading. Please reload this page.
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.
I think this bug highlights that the current solution might be more of a workaround than an improvement and now we’re considering adding an extra hack on top.
According to the GitHub style guide, the README “should be located in the top-level directory for your product or library’s actual codebase”:
https://google.github.io/styleguide/docguide/READMEs.html#what-to-put-in-your-readme
If we move it to the root, contributors and visitors can immediately understand the project without digging into subfolders.
We could technically add a copy command in a prepublishOnly script, but that only runs right before publishing. It wouldn’t help with local development or repo clarity, and it adds unnecessary complexity. Keeping the README in the root is simpler, avoids extra steps and follows convention. Why not keep it simple? 😀
Uh oh!
There was an error while loading. Please reload this page.
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.
The README is read out of the GitHub directory for the repo and temporarily copied for the NPM deployment. I honestly don't see an issue 😅. I do see your point that the two extra scripts are not needed but I don't think it's an issue to have them and it keeps the root cleaner to me. In saying that, if you insist on it being in the root for conventions sake... maybe. I'm still not convinced but if you insist I suppose I can live with that argument but I still prefer it tidied into the GitHub directory personally since it's a supported location and it's only NPM that needs the deploy scripts which have 0 overhead. Let me know what your opinion is and we can see what to do 🤷🏻♂️.