diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ec7354d426059..1311bd2ab401f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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 git@github.com: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. diff --git a/bin/install-node-nvm.sh b/bin/install-node-nvm.sh index 6aa7583c9bfc9..0588704ee84f0 100755 --- a/bin/install-node-nvm.sh +++ b/bin/install-node-nvm.sh @@ -59,12 +59,8 @@ fi # Check if the current node version is up to date. if [ "$TRAVIS" != "true" ] && [ "$(nvm current)" != "$(nvm version-remote --lts)" ]; then - echo -en $(status_message "Updating Node..." ) - nvm install >/dev/null 2>&1 - echo ' done!' - - echo -e $(warning_message "A new node version was installed, please run this command to use it:" ) - echo -e $(warning_message "$(action_format "nvm use")" ) + echo -e $(warning_message "Node version does not match the latest long term support version. Please run this command to install and use it:" ) + echo -e $(warning_message "$(action_format "nvm install")" ) echo -e $(warning_message "After that, re-run the setup script to continue." ) exit 1 fi