diff --git a/README.md b/README.md index a61c8768..713ba582 100644 --- a/README.md +++ b/README.md @@ -7,8 +7,36 @@ with plugins which create blocks. See also: [Gutenberg developer documentation](https://wordpress.org/gutenberg/handbook/) +## Build `esnext` Examples + For each of the examples that include an `esnext` example the following commands are required to build the plugins: - `npm install` to install the node packages - `npm run build` to build the production version of the plugin or `npm run dev` to build a development version of the plugin and watch changes for automatic rebuild +## 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. Install [docker-ce](https://store.docker.com/search?type=edition&offering=community) and [docker-compose](https://docs.docker.com/compose/install/) by following the most recent instructions on the docker site. + +In the folder of your preference, clone this project and enter the working directory: + +``` +git clone git@github.com:WordPress/gutenberg-examples.git +cd gutenberg-examples +``` + +To bring up this local WordPress instance run: + +``` +docker-compose up -d +``` + +The WordPress should be available at http://localhost:9999 + +To stop this local WordPress instance later run: + +``` +docker-compose stop +``` + + diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 00000000..4b8d6f6e --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,17 @@ +version: '3.1' + +services: + + wordpress: + image: wordpress + ports: + - 9999:80 + environment: + WORDPRESS_DB_PASSWORD: example + volumes: + - ./:/var/www/html/wp-content/plugins/gutenberg-example + + mysql: + image: mysql:5.7 + environment: + MYSQL_ROOT_PASSWORD: example