In my package I have three readme files, like the following:
When I publish the package with npm publish, it doesn't shows up the README.md file as the package info at https://www.npmjs.org/, but instead it gets whatever other README file it encounters first.
There is a way to enforce the main README file that npm gets? Or I have to move the other README files to a subdir?
Thanks in advance for your help.
Although it is undocumented, I believe you can set "readmeFilename" in your package.json to specify which README should be used.
See the discussion here: #3573 (comment)
Whoops, nope, I have that backwards. Apparently readmeFilename is SET with the name of the the file that README data was drawn from.
The workaround that you have settled on (renaming/moving files to a subdirectory) is probably the correct approach.
@smikes Ok, currently I solved the issue by moving the secondary README files to a subdir as you said, but it could be nice to have an option similar to the one you pointed out to specify the main README file so the subdir workaround can be avoided
So thanks to add to the discussion, despite the fact that readmeFilename couldn't be used!