From 15b698116fdf9cac04905950bda0c2864bd9c095 Mon Sep 17 00:00:00 2001 From: Nick Diego Date: Thu, 4 Jan 2024 15:38:40 -0600 Subject: [PATCH] Add new section to the Quick Start Guide about wp-env (#57559) * Add new section to guide. * Minor tweak. --- docs/getting-started/quick-start-guide.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/getting-started/quick-start-guide.md b/docs/getting-started/quick-start-guide.md index e978b250ab8aff..c6f22ce219136c 100644 --- a/docs/getting-started/quick-start-guide.md +++ b/docs/getting-started/quick-start-guide.md @@ -25,7 +25,7 @@ Navigate to the Plugins page of your local WordPress installation and activate t ## Basic usage -With the plugin activated, you can explore how the block works. Use the following command to move into the newly created plugin folder and start the development process. +With the plugin activated, you can explore how the block works. Use the following command to move into the newly created plugin folder and start the development process. ```sh cd copyright-date-block && npm start @@ -37,6 +37,14 @@ The `npm start` command will start a development server and watch for changes in When you are finished making changes, run the `npm run build` command. This optimizes the block code and makes it production-ready. +## View the block in action + +You can use any local WordPress development environment to test your new block, but the scaffolded plugin includes configuration for `wp-env`. You must have [Docker](https://www.docker.com/products/docker-desktop) already installed and running on your machine, but if you do, run the `npx wp-env start` command. + +Once the script finishes running, you can access the local environment at: `http://localhost:8888`. Log into the WordPress dashboard using username `admin` and password `password`. The plugin will already be installed and activated. Open the Editor or Site Editor, and insert the Copyright Date Block as you would any other block. + +Visit the [Getting started](https://developer.wordpress.org/block-editor/getting-started/devenv/get-started-with-wp-env/) guide to learn more about `wp-env`. + ## Additional resources - [Get started with create-block](https://developer.wordpress.org/block-editor/getting-started/devenv/get-started-with-create-block/)