DTaaS
DTaaS copied to clipboard
Wrong READMEs in github packages
GitHub Packages uses the README from the root of the repository for all packages in the repository. If you want to have a specific README for a package in a monorepo, you can use a workaround.
The workaround is to temporarily move to the package directory, copy the package-specific README to the root, publish the package, and then move the README back. Here's how you can do it:
# Move to the package directory
cd package
# Copy the package README to the root
cp README.md ../
# Publish the package
npm publish
# Restore the root README back
mv README.md packages/my-package/
This will ensure that the package-specific README is used when publishing the package to GitHub Packages. Remember to replace packages/my-package
with the actual path to your package directory.
courtesy: Github co-pilot