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.
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
Docs: Move DevEnv to own section for docs #23593
Docs: Move DevEnv to own section for docs #23593
Changes from all commits
ae9a23e
f3130ea
5c65fdc
fed1376
55e274a
81b59e4
3e51693
ff3f6c6
4014c29
346fda0
2ad518d
500479a
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
The short guide.
In terminal - Mac, Windows or Linux.
Install nvm:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
Quit and restart terminal.
Install node:
nvm install --lts
Download and install Docker. Startup Docker (?) ...
In terminal.
npm -g install @wordpress/env
Check to see it has been installed:
wp-env --version
Do something (?)
Then in terminal:
wp-env start
You should now have a local development environment in place. If something does not work then check the uninstall guide to remove and start over. - @mkaz and @noahtallen it would be good to have a section for uninstalling all that we have installed. To start over if needed.
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.
The do something step is from the Create a Block tutorial, on generating the plugin directory see wp-plugin.md.
The create block script creates a plugin directory, you run the wp-env start from within that directory.
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.
you can uninstall wp-env like so:
wp-env destroy
to destroy the local environment data for a specific projestnpm uninstall -g @wordpress/env
will uninstall the npm package, but will not remove any environment dataThere 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.
The do something step is confusing as we are having nice and logical steps on what to do in terminal to setup a local WordPress development. I expect the do something step will then create the local WordPress development site which we can then easily access. I am saying the same thing just below. We should not refer to another tutorial as that information can come later.
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.
Thanks Noah! Btw how do we test to see that all of it is actually uninstalled?
Having uninstall information (as you added) and checking to see that it is uninstalled would be helpful.
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.
If it is actually uninstalled, then
wp-env start
will result in an error like "command not found". Additionally, if you destroyed your environment, the commanddocker ps -a
, which shows a list of local environments, will not display environments associated with the local environment that was deleted.Verifying that the environment was properly uninstalled is kind of complicated because you have to understand how Docker works and how wp-env works under the hood, since several different things are cleaned up when you run
wp-env destroy
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 am thinking as long as one gets the error messages one is supposed to get then that would be the confirmatation that it is uninstalled.
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.
It is confusing going from working in terminal to suddenly mentioning the plugin directory.
Where is the plugin directory? We need a step that goes from checking the wp-env to locating the plugin directory and then running wp-env start. This needs clarification.
"...if you are following the create block tutorial, this would be in the generated directory."
This seems out of context. As the context is setting up a local dev environment to be used with creating a plugin and/or contributing to Gutenberg.
(I added a similar comment in the below solved comment thread, but as it got hidden I am adding it again here.)
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'm not sure setting up a dev environment with no context makes much sense. There is a reason you are setting up an environment, the most likely is for developing a plugin or theme. If you are following the create a block tutorial it provides the context in that tutorial here.
Otherwise, you might of come to this page wanting to setup an environment to create a plugin, so you would have that in mind already.
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.
We has this introduction:
"The development environment setup guide is for setting up your local development environment for JavaScript development; creating plugins and tools for extending WordPress and the block editor."
This is how I understand it:
Setup a local WordPress development site for creating own plugin and/or contributing to WordPress/Gutenberg. (That is the context.)
"If you are following the create a block tutorial it provides the context in that tutorial here."
As the doc we are working on right now is the very first tutorial for setting up a local dev site I find it confusing that someone would be following the next tutorial in the series so to speak. As the tutorial we have now would be a prerequisite for the block tutorial. Having a side path to tutorial 2 seems strange at this stage.
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.
Unrelated to this PR, but can we move Meta Boxes Tutorial further? :)