Enhance readme CLI command to support standalone plugins #1075
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.
Summary
Follow up to #1064: This PR enhances the
npm run readme
command to support standalone plugins. Given the changelog command was already updated, the only necessary change was to dynamically identify whichreadme.txt
file to update, as before it would always update the rootreadme.txt
file.Relevant technical choices
path
option was added, however that's purely for flexibility and is optional.path
will automatically be detected via themilestone
option.plugin-slug v.e.r.s.i.o.n
so that this script can detect the relevant plugin automatically.You can test this by e.g. running:
npm run readme -- -m "performance-lab 3.0.0"
npm run readme -- -m "speculation-rules 1.1.0"
Don't commit the changes though, it's just for testing, particularly as both changelogs at this point contain a few manually added entries that are worth keeping.