Ensure all NPM packages have readmes included in their builds - #2156
Merged
Conversation
bgrgicak
commented
Feb 25, 2025
bgrgicak
marked this pull request as ready for review
February 26, 2025 08:30
adamziel
pushed a commit
that referenced
this pull request
May 30, 2025
## Motivation for the change, related issues
This PR ensures all public package builds include a README.md file,
because some of our NPM packages don't include a readme on the npmjs.com
package page.
The readmes exist in project folders, but before this PR they were not
added to the built version of the package.
## Implementation details
Add `build:README` step to these public packages:
- @php-wasm/cli
- @php-wasm/progress
- @php-wasm/scopes
- @php-wasm/web-service-worker
- @wp-playground/blueprints
- @wp-playground/cli
- @wp-playground/client
- @wp-playground/components
- @wp-playground/remote
- @wp-playground/sync
## Testing Instructions (or ideally a Blueprint)
- Remove the `dist` folder if it exists
- Run `npm run build`
- Check that all PHP-wasm builds have a README.md
```
find dist/packages/php-wasm -mindepth 1 -maxdepth 1 -type d '!' -exec test -e '{}/README.md' \; -print
```
- The above command should only return
`dist/packages/php-wasm/out-tsc-phpwasm-node` which isn't a package
- Check that all Playground builds have a README.md
```
find dist/packages/playground -mindepth 1 -maxdepth 1 -type d '!' -exec test -e '{}/README.md' \; -print
```
- The above command should only return
`dist/packages/playground/website` which isn't a published package
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Motivation for the change, related issues
This PR ensures all public package builds include a README.md file,
because some of our NPM packages don't include a readme on the npmjs.com package page.
The readmes exist in project folders, but before this PR they were not added to the built version of the package.
Implementation details
Add
build:READMEstep to these public packages:Testing Instructions (or ideally a Blueprint)
distfolder if it existsnpm run builddist/packages/php-wasm/out-tsc-phpwasm-nodewhich isn't a packagedist/packages/playground/websitewhich isn't a published package