Skip to content
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

wp now: add codespaces support #41

Merged
merged 8 commits into from
Jun 1, 2023
Merged

Conversation

sejas
Copy link
Collaborator

@sejas sejas commented May 31, 2023

What

Allow running wp-now in any GitHub codespace, even in the default one.

How

  • Avoid crashing if we cannot open the browser
  • Skip opening the browser for codespaces
  • Change the default URL for codespaces which uses port forwarding

Why

It improves the dev experience and makes it easier to develop WordPress themes and plugins directly from the repo.
It will be great for contributors day.

Testing steps

Screenshot 2023-05-31 at 23 41 54
  • Run these commands:
git checkout add/wp-now-codespaces-support
nvm install 18.13.0
nvm use 18.13.0
npm install
npx nx build wp-now && node dist/packages/wp-now/main.js start
  • Click on the printed URL or popup to open the browser. This URL is also available in the ports tab.
  • Observe you can access your WordPress instance.
  • After this branch is deployed and we release a new wp-now version on npm we can try it on Gutenberg or core repositories.

Screencast

wp-now.codespaces.mp4

@sejas sejas self-assigned this May 31, 2023
@sejas sejas requested review from adamziel and danielbachhuber May 31, 2023 23:01
@kozer
Copy link
Collaborator

kozer commented Jun 1, 2023

Tested and it seems that works as expected:

  • I successfully build wp-now
  • The URL was successfully generated
  • I followed the link and the port forwarding worked as expected. The site worked as expected.

@sejas sejas added the wp-now label Jun 1, 2023
@sejas sejas merged commit f2f21da into trunk Jun 1, 2023
@sejas sejas deleted the add/wp-now-codespaces-support branch June 1, 2023 12:16
johnhooks pushed a commit to johnhooks/playground-tools that referenced this pull request Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants