Remote.html: Use Playground CLI to produce minified WordPress build #1416
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.
Do not merge – explorations in progress
Changes
Uses Playground CLI to produce a minified WordPress build, replacing the custom bash-based WordPres installation flow that relied on wget, unzip, sed, wp-cli etc.
This is to dogfood Playground CLI and put the boot protocol to a practical use. With this PR, CLI Playground produces a minified WordPress version that is later used to boot the web Playground. Eventually, the minification logic could be just a Blueprint instead of a Dockerfile. For now, though, I didn't explore that.
This PR also:
/internal/shared/auto_prepend_file.php
is loaded even when evaling a code snippet and not a file – it turns out that wasn't the case before!/internal
in remote.html to avoid polluting the siteThe WordPress installation wizard could likely be punted to another PR to keep the scope smaller.
Remaining work
Testing instructions
Rebuild the latest WordPress with
Then run
npm run dev
and confirm the local Playground loads without any issues.Related: #1398