Open JimLynchCodes opened 1 year ago
@JimLynchCodes for npm the README needs to start with any case and only allows extensions. Instead of using “-“ replace it with “.”.
Interesting! was not aware of that. thanks 👍
@JimLynchCodes you are welcome, feel free to post any issues or PRs for changes, questions, etc!
Hi @j-mendez I am reopening this issue because I just tried this again with another project that has the packages point to a readme named README.registry.md
.
I'm seeing the name weird behavior though that it works correctly on crates.io but still shows the regular README.md
file's content on the npm page...
If you have a root README without extensions it should load prominently first. Is the goal trying to declare a README as root?
“Is the goal trying to declare a README as root?”
yes, personally I like having all the project files including README.md at the root of the repository because I don’t like having the files right there without having to dive into nested directories.
GitHub uses ‘README.me’ as the content displayed when you go to the repo on GitHub. AFAIK there is no way to have github use a readme with a different name for this…
so then when deploying my cli tool I am forced to use the same readme for registry content and GitHub page…
Is it really correct that README without extension should load predominantly first even when I specify a different README for the package’s readme field? 🤔
@JimLynchCodes the only workaround would be to use temp files that could be created with the CLI with modifications to swap README targets for NPM. If a README.md file is found it will be used as root display on their end, nothing we can adjust without a PR to npm etc.
Hi, I am doing kind of a weird thing, but I think I have discovered a bug in doing it...
My project: https://github.com/JimLynchCodes/jims-rust-to-npm-test
My project's
Cargo.toml
file: https://github.com/JimLynchCodes/jims-rust-to-npm-test/blob/main/jims-rust-cli-test/Cargo.tomlwhich has the line:
readme = "README-for-registry.md"
The strange thing is that crates.io does seem to be using the readme located at
README-for-registry.md
, but the npm one seems to be ignoring this field and just uses the content fromREADME.md
.package on crates.io: https://crates.io/crates/jims-rust-cli-test
package on npmjs.com: https://www.npmjs.com/package/jims-rust-cli-test
I can probably pretty easily workaround this by just naming my registry README "README.md", but I just wanted to bring this to your attention since it seems like a bug to me. And in general I like the idea of being able to put all my cargo project files in the root of the repo (visible on github) but have it deploy a different README to the registries. Another somewhat related thing that I'm wondering is if it would make sense to have two different Cargo.toml fields- one pointing to a README to use on crates.io and one to a README to use on npmjs.com...
Thanks!