-
Notifications
You must be signed in to change notification settings - Fork 52
Add documentation for testing with local Playground packages #2144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: trunk
Are you sure you want to change the base?
Conversation
📊 Performance Test ResultsComparing 25e8212 vs trunk site-editor
site-startup
Results are median values from multiple test runs. Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change |
wojtekn
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a great start! I was able to run dev-mode Playground in Studio, easily modify it, and apply changes in Studio:
[playground-cli] Enabling experimental multi-worker support with 13 workers (CPU cores - 1)
[playground-cli] The fs-ext package is not installed. Internal file locking will not be integrated with host OS file locking.
[playground-cli] Starting a PHP server...
[playground-cli] Starting up workers
[playground-cli] Skipping YOLO SQLite integration plugin setup...
[playground-cli] Booting WordPress...
| ```json | ||
| { | ||
| "dependencies": { | ||
| "@php-wasm/fs-journal": "file:../wordpress-playground/dist/packages/php-wasm/fs-journal", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it also make sense to reorganize nodes in the package.json to make the replacement easier?
| Run this from the wordpress-playground root: | ||
|
|
||
| ```bash | ||
| cd /path/to/wordpress-playground |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if we added this script to tools/scripts/ in the Playground repository, and made it available as NPM command in package.json?
@adamziel any thoughts?
| npx nx build playground-cli # or other package name | ||
| ``` | ||
|
|
||
| 2. Restart Studio (type `rs` in the terminal or restart `npm start`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I couldn't make the rs command work, and I needed to restart npm start.
|
|
||
| To go back to using the published npm packages: | ||
|
|
||
| 1. Restore the original version numbers in `package.json` (use `git checkout package.json`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I needed to revert package-lock.json, too. In the other case, it kept installing symlinked packages.
|
|
||
| ## Reverting to npm Packages | ||
|
|
||
| To go back to using the published npm packages: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we also include instructions showing how to revert changes in Playground repo?
Related issues
Proposed Changes
docs/testing-with-local-playground.mdwith step-by-step guide for testing Studio with locally built WordPress Playground packagesCONTRIBUTING.mdto link to the new documentationTesting Instructions
Pre-merge Checklist