-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update local install instructions and add add more verbose instructio…
…ns when node versions don't match (#7847) Updates the contributing README to clarify install instructions for a local environment and what the successful script looks like. Suggests updates to the setup script to provide more instructions if nvm install fails in the bash script.
- Loading branch information
Showing
2 changed files
with
36 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,11 +22,44 @@ To test the plugin, or to contribute to it, you can clone this repository and bu | |
|
||
### Local Environment | ||
|
||
First, you need a WordPress Environment to run the plugin on. The quickest way to get up and running is to use the provided docker setup. Just install [docker](https://www.docker.com/) and [docker-compose](https://docs.docker.com/compose/) on your machine and run `./bin/setup-local-env.sh`. | ||
First, you need a WordPress Environment to run the plugin on. The quickest way to get up and running is to use the provided docker setup. Install [docker](https://www.docker.com/) and [docker-compose](https://docs.docker.com/compose/) by following the most recent instructions on the docker site. | ||
|
||
In the folder of your preference, clone this project and enter the working directory: | ||
```bash | ||
git clone [email protected]:WordPress/gutenberg.git | ||
cd gutenberg | ||
``` | ||
|
||
Then, run a setup script to check if docker and node are configured properly and starts the local WordPress instance. You may need to run this script multiple times if prompted. | ||
``` | ||
./bin/setup-local-env.sh | ||
``` | ||
|
||
If everything was successful, you'll see the following ascii art: | ||
``` | ||
Welcome to... | ||
,⁻⁻⁻· . | | ||
| ،⁓’. . |--- ,---. ,---. |---. ,---. ,---. ,---. | ||
| | | | | |---' | | | | |---' | | | | ||
`---' `---' `---’ `---’ ' ` `---' `---’ ` `---| | ||
`---' | ||
``` | ||
|
||
The WordPress installation should be available at `http://localhost:8888` (username: `admin`, password: `password`). | ||
Inside the "docker" directory, you can use any docker command to interact with your containers. If this port is in use, you can override it in your `docker-compose.override.yml` file. If you're running [e2e tests](https://wordpress.org/gutenberg/handbook/reference/testing-overview/#end-to-end-testing), this change will be used correctly. | ||
|
||
To bring down this local WordPress instance later run: | ||
``` | ||
docker-compose down | ||
``` | ||
|
||
If you'd like to see your changes reflected in this local WordPress instance, run: | ||
``` | ||
npm install | ||
npm run dev | ||
``` | ||
|
||
Alternatively, you can use your own local WordPress environment and clone this repository right into your `wp-content/plugins` directory. | ||
|
||
Next, open a terminal (or if on Windows, a command prompt) and navigate to the repository you cloned. Now type `npm install` to get the dependencies all set up. Then you can type `npm run dev` in your terminal or command prompt to keep the plugin building in the background as you work on it. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters