From 2e5025b25ac83fbc63b692e282285ec61bd25d83 Mon Sep 17 00:00:00 2001 From: Grzegorz Ziolkowski Date: Thu, 25 Apr 2019 17:54:20 +0200 Subject: [PATCH 1/2] Documentation: Update CONTRIBUTING docs --- CONTRIBUTING.md | 133 +------------------------ docs/contributors/develop.md | 12 ++- docs/contributors/getting-started.md | 90 +++++++++++++++++ docs/contributors/git-workflow.md | 21 ++++ docs/contributors/localizing.md | 9 ++ docs/contributors/managing-packages.md | 8 ++ docs/manifest.json | 30 ++++-- docs/toc.json | 7 +- 8 files changed, 167 insertions(+), 143 deletions(-) create mode 100644 docs/contributors/getting-started.md create mode 100644 docs/contributors/localizing.md create mode 100644 docs/contributors/managing-packages.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f3c371c089f38..24994336cbeb4 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -10,125 +10,9 @@ All WordPress projects are [licensed under the GPLv2+](/LICENSE.md), and all con This document covers the technical details around setup, and submitting your contribution to the Gutenberg project. -## Getting Started +## Developer Contributions -Gutenberg is a Node.js-based project, built primarily in JavaScript. - -The easiest way to get started (on MacOS, Linux, or Windows 10 with the Linux Subsystem) is by running the Local Environment setup script, `./bin/setup-local-env.sh`. This will check if you have everything installed and updated, and help you download any extra tools you need. - -For another version of Windows, or if you prefer to set things up manually, be sure to have Node.js installed first. You should be running a Node version matching the [current active LTS release](https://github.com/nodejs/Release#release-schedule) or newer for this plugin to work correctly. You can check your Node.js version by typing `node -v` in the Terminal prompt. - -If you have an incompatible version of Node in your development environment, you can use [nvm](https://github.com/creationix/nvm) to change node versions on the command line: - -``` -nvm install -nvm use -``` - -You also should have the latest release of [npm installed][npm]. npm is a separate project from Node.js and is updated frequently. If you've just installed Node.js which includes a version of npm within the installation you most likely will need also to update your npm installation. To update npm, type this into your terminal: `npm install npm@latest -g` - -To test the plugin, or to contribute to it, you can clone this repository and build the plugin files using Node. How you do that depends on whether you're developing locally or uploading the plugin to a remote host. - -### 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](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 you're developing themes, or core WordPress functionality alongside Gutenberg**, you can make the WordPress files accessible in `wordpress/` by following these instructions instead: - -1. If this is your first time setting up the environment, run `DOCKER_ENV=localwpdev ./bin/setup-local-env.sh` instead of `./bin/setup-local-env.sh` -2. If you've already had the previous environment set up, you need to start fresh, and you can do that by first running `docker-compose down --rmi all`. After that, you can repeat step 1. -3. If you turn off your computer or restart Docker, you can get your local WordPress dev environment back by typing `docker-compose -f docker-compose.yml -f docker-compose-localdev.yml up`. If you just run `docker-compose up`, you will get the vanilla install that doesn't expose the WordPress folder. - -**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](/docs/contributors/testing-overview.md#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. - -WordPress comes with specific [debug systems](https://codex.wordpress.org/Debugging_in_WordPress) designed to simplify the process as well as standardize code across core, plugins and themes. It is possible to use environment variables (`WP_DEBUG` and `SCRIPT_DEBUG`) to update a site's configuration constants located in `wp-config.php` file. Both flags can be disabled at any time by running the following command: -``` -SCRIPT_DEBUG=false WP_DEBUG=false ./bin/setup-local-env.sh -``` -By default, both flags will be set to `true`. - -### On A Remote Server - -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. Once that finishes, you can type `npm run build`. You can now upload the entire repository to your `wp-content/plugins` directory on your web server and activate the plugin from the WordPress admin. - -You can also type `npm run package-plugin` which will run the two commands above and create a zip file automatically for you which you can use to install Gutenberg through the WordPress admin. - -## Workflow - -A good workflow for new contributors to follow is listed below: -- Fork Gutenberg repository -- Clone forked repository -- Create a new branch -- Make code changes -- Commit code changes within the newly created branch -- Push branch to forked repository -- Submit Pull Request to Gutenberg repository - -Ideally name your branches with prefixes and descriptions, like this: `[type]/[change]`. A good prefix would be: - -- `add/` = add a new feature -- `try/` = experimental feature, "tentatively add" -- `update/` = update an existing feature - -For example, `add/gallery-block` means you're working on adding a new gallery block. - -You can pick among all the tickets, or some of the ones labelled Good First Issue. - -The workflow is documented in greater detail in the [repository management](/docs/contributors/repository-management.md) document. - -## Playground - -The Gutenberg repository also includes a static Gutenberg playground that allows testing and developing in a WordPress-agnostic context. This is very helpful for developing reusable components and trying generic JavaScript modules without any backend dependency. - -You can launch the playground by running `npm run playground:start` locally. The playground should be available on [http://localhost:1234](http://localhost:1234). - -## Testing - -Gutenberg contains both PHP and JavaScript code and encourages testing and code style linting for both. It also incorporates end-to-end testing using [Google Puppeteer](https://developers.google.com/web/tools/puppeteer/). You can find out more details in [Testing Overview document](/docs/contributors/testing-overview.md). - -## Managing Packages - -This repository uses [lerna] to manage Gutenberg modules and publish them as packages to [npm]. This enforces certain steps in the workflow which are described in details in [packages](/packages/README.md) documentation. - -Maintaining dozens of npm packages is difficult—it can be tough to keep track of changes. That's why we use `CHANGELOG.md` files for each package to simplify the release process. As a contributor you should add an entry to the aforementioned file each time you contribute adding production code as described in [Maintaining Changelogs](/packages/README.md#maintaining-changelogs) section. +Please see the [Developer Contributions section](/docs/contributors/develop.md) of the Contributor Handbook. ## How Can Designers Contribute? @@ -147,16 +31,3 @@ If you're contributing to the documentation of any component from the `@wordpres ## Reporting Security Issues Please see [SECURITY.md](/SECURITY.md). - -## Localizing Gutenberg Plugin - -To translate Gutenberg in your locale or language, [select your locale here](https://translate.wordpress.org/projects/wp-plugins/gutenberg) and translate *Development* (which contains the plugin's string) and/or *Development Readme* (please translate what you see in the Details tab of the [plugin page](https://wordpress.org/plugins/gutenberg/)). - -A Global Translation Editor (GTE) or Project Translation Editor (PTE) with suitable rights will process your translations in due time. - -Language packs are automatically generated once 95% of the plugin's strings are translated and approved for a locale. - -The eventual inclusion of Gutenberg into WordPress core means that more than 51% of WordPress installations running a translated WordPress installation will have Gutenberg's translated strings compiled into the core language pack as well. - -[lerna]: https://lernajs.io/ -[npm]: https://www.npmjs.com/ diff --git a/docs/contributors/develop.md b/docs/contributors/develop.md index 97fa91aab0f78..7b8ad300ee316 100644 --- a/docs/contributors/develop.md +++ b/docs/contributors/develop.md @@ -1,11 +1,15 @@ # Developer Contributions -Please see [CONTRIBUTING.md](https://github.com/WordPress/gutenberg/blob/master/CONTRIBUTING.md) for technical details on how to setup and make contributions to the Gutenberg repository. +Please also see [CONTRIBUTING.md](https://github.com/WordPress/gutenberg/blob/master/CONTRIBUTING.md) for general information about contributions to the Gutenberg repository. The following resources offer additional information for developers who wish to contribute to Gutenberg: +* [Getting Started](/docs/contributors/getting-started.md). +* [Git Workflow](/docs/contributors/git-workflow.md). * [Coding Guidelines](/docs/contributors/coding-guidelines.md) outline additional patterns and conventions used in the Gutenberg project. -* [Gutenberg Block Grammar](/docs/contributors/grammar.md) * [Testing Overview](/docs/contributors/testing-overview.md) for PHP and JavaScript development in Gutenberg. -* [Scripts](/docs/contributors/scripts.md) a list of vendor and internal scripts available to plugin developers. -* [Gutenberg Release Process](/docs/contributors/release.md) a checklist for the different type of releases for Gutenberg project. +* [Gutenberg Block Grammar](/docs/contributors/grammar.md). +* [Scripts](/docs/contributors/scripts.md) - a list of vendor and internal scripts available to plugin developers. +* [Managing Packages](/docs/contributors/managing-packages.md). +* [Gutenberg Release Process](/docs/contributors/release.md) - a checklist for the different type of releases for Gutenberg project. +* [Localizing Gutenberg Plugin](/docs/contributors/localizing.md) - a guide on how to translate Gutenberg in your locale or language. diff --git a/docs/contributors/getting-started.md b/docs/contributors/getting-started.md new file mode 100644 index 0000000000000..ed84cb6e81376 --- /dev/null +++ b/docs/contributors/getting-started.md @@ -0,0 +1,90 @@ +# Getting Started + +Gutenberg is a Node.js-based project, built primarily in JavaScript. + +The easiest way to get started (on MacOS, Linux, or Windows 10 with the Linux Subsystem) is by running the Local Environment setup script, `./bin/setup-local-env.sh`. This will check if you have everything installed and updated, and help you download any extra tools you need. + +For another version of Windows, or if you prefer to set things up manually, be sure to have Node.js installed first. You should be running a Node version matching the [current active LTS release](https://github.com/nodejs/Release#release-schedule) or newer for this plugin to work correctly. You can check your Node.js version by typing `node -v` in the Terminal prompt. + +If you have an incompatible version of Node in your development environment, you can use [nvm] to change node versions on the command line: + +``` +nvm install +nvm use +``` + +You also should have the latest release of [npm installed][npm]. npm is a separate project from Node.js and is updated frequently. If you've just installed Node.js which includes a version of npm within the installation you most likely will need also to update your npm installation. To update npm, type this into your terminal: `npm install npm@latest -g` + +To test the plugin, or to contribute to it, you can clone this repository and build the plugin files using Node. How you do that depends on whether you're developing locally or uploading the plugin to a remote host. + +## 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](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 you're developing themes, or core WordPress functionality alongside Gutenberg**, you can make the WordPress files accessible in `wordpress/` by following these instructions instead: + +1. If this is your first time setting up the environment, run `DOCKER_ENV=localwpdev ./bin/setup-local-env.sh` instead of `./bin/setup-local-env.sh` +2. If you've already had the previous environment set up, you need to start fresh, and you can do that by first running `docker-compose down --rmi all`. After that, you can repeat step 1. +3. If you turn off your computer or restart Docker, you can get your local WordPress dev environment back by typing `docker-compose -f docker-compose.yml -f docker-compose-localdev.yml up`. If you just run `docker-compose up`, you will get the vanilla install that doesn't expose the WordPress folder. + +**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](/docs/contributors/testing-overview.md#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. + +WordPress comes with specific [debug systems](https://codex.wordpress.org/Debugging_in_WordPress) designed to simplify the process as well as standardize code across core, plugins and themes. It is possible to use environment variables (`WP_DEBUG` and `SCRIPT_DEBUG`) to update a site's configuration constants located in `wp-config.php` file. Both flags can be disabled at any time by running the following command: +``` +SCRIPT_DEBUG=false WP_DEBUG=false ./bin/setup-local-env.sh +``` +By default, both flags will be set to `true`. + +## On A Remote Server + +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. Once that finishes, you can type `npm run build`. You can now upload the entire repository to your `wp-content/plugins` directory on your web server and activate the plugin from the WordPress admin. + +You can also type `npm run package-plugin` which will run the two commands above and create a zip file automatically for you which you can use to install Gutenberg through the WordPress admin. + +[npm]: https://www.npmjs.com/ +[nvm]: https://github.com/creationix/nvm + +## Playground + +The Gutenberg repository also includes a static Gutenberg playground that allows testing and developing in a WordPress-agnostic context. This is very helpful for developing reusable components and trying generic JavaScript modules without any backend dependency. + +You can launch the playground by running `npm run playground:start` locally. The playground should be available on [http://localhost:1234](http://localhost:1234). + diff --git a/docs/contributors/git-workflow.md b/docs/contributors/git-workflow.md index f159b46126e61..7f1499bc7de34 100644 --- a/docs/contributors/git-workflow.md +++ b/docs/contributors/git-workflow.md @@ -1,5 +1,26 @@ # Git Workflow +A good workflow for new contributors to follow is listed below: +- Fork Gutenberg repository +- Clone forked repository +- Create a new branch +- Make code changes +- Commit code changes within the newly created branch +- Push branch to forked repository +- Submit Pull Request to Gutenberg repository + +Ideally name your branches with prefixes and descriptions, like this: `[type]/[change]`. A good prefix would be: + +- `add/` = add a new feature +- `try/` = experimental feature, "tentatively add" +- `update/` = update an existing feature + +For example, `add/gallery-block` means you're working on adding a new gallery block. + +You can pick among all the tickets, or some of the ones labelled Good First Issue. + +The workflow is documented in greater detail in the [repository management](/docs/contributors/repository-management.md) document. + ## Keeping Your Branch Up To Date When many different people are working on a project simultaneously, pull requests can go stale quickly. A "stale" pull request is one that is no longer up to date with the main line of development, and it needs to be updated before it can be merged into the project. diff --git a/docs/contributors/localizing.md b/docs/contributors/localizing.md new file mode 100644 index 0000000000000..c5b22e675d51e --- /dev/null +++ b/docs/contributors/localizing.md @@ -0,0 +1,9 @@ +# Localizing Gutenberg Plugin + +To translate Gutenberg in your locale or language, [select your locale here](https://translate.wordpress.org/projects/wp-plugins/gutenberg) and translate *Development* (which contains the plugin's string) and/or *Development Readme* (please translate what you see in the Details tab of the [plugin page](https://wordpress.org/plugins/gutenberg/)). + +A Global Translation Editor (GTE) or Project Translation Editor (PTE) with suitable rights will process your translations in due time. + +Language packs are automatically generated once 95% of the plugin's strings are translated and approved for a locale. + +The eventual inclusion of Gutenberg into WordPress core means that more than 51% of WordPress installations running a translated WordPress installation will have Gutenberg's translated strings compiled into the core language pack as well. diff --git a/docs/contributors/managing-packages.md b/docs/contributors/managing-packages.md new file mode 100644 index 0000000000000..000a74026469f --- /dev/null +++ b/docs/contributors/managing-packages.md @@ -0,0 +1,8 @@ +# Managing Packages + +This repository uses [lerna] to manage Gutenberg modules and publish them as packages to [npm]. This enforces certain steps in the workflow which are described in details in [packages](/packages/README.md) documentation. + +Maintaining dozens of npm packages is difficult—it can be tough to keep track of changes. That's why we use `CHANGELOG.md` files for each package to simplify the release process. As a contributor you should add an entry to the aforementioned file each time you contribute adding production code as described in [Maintaining Changelogs](/packages/README.md#maintaining-changelogs) section. + +[lerna]: https://lernajs.io/ +[npm]: https://www.npmjs.com/ diff --git a/docs/manifest.json b/docs/manifest.json index 984142d7ed55e..523a83487f11c 100644 --- a/docs/manifest.json +++ b/docs/manifest.json @@ -431,6 +431,18 @@ "markdown_source": "https://raw.githubusercontent.com/WordPress/gutenberg/master/docs/contributors/develop.md", "parent": "contributors" }, + { + "title": "Getting Started", + "slug": "getting-started", + "markdown_source": "https://raw.githubusercontent.com/WordPress/gutenberg/master/docs/contributors/getting-started.md", + "parent": "develop" + }, + { + "title": "Git Workflow", + "slug": "git-workflow", + "markdown_source": "https://raw.githubusercontent.com/WordPress/gutenberg/master/docs/contributors/git-workflow.md", + "parent": "develop" + }, { "title": "Coding Guidelines", "slug": "coding-guidelines", @@ -443,12 +455,6 @@ "markdown_source": "https://raw.githubusercontent.com/WordPress/gutenberg/master/docs/contributors/testing-overview.md", "parent": "develop" }, - { - "title": "Git Workflow", - "slug": "git-workflow", - "markdown_source": "https://raw.githubusercontent.com/WordPress/gutenberg/master/docs/contributors/git-workflow.md", - "parent": "develop" - }, { "title": "Block Grammar", "slug": "grammar", @@ -461,12 +467,24 @@ "markdown_source": "https://raw.githubusercontent.com/WordPress/gutenberg/master/docs/contributors/scripts.md", "parent": "develop" }, + { + "title": "Managing Packages", + "slug": "managing-packages", + "markdown_source": "https://raw.githubusercontent.com/WordPress/gutenberg/master/docs/contributors/managing-packages.md", + "parent": "develop" + }, { "title": "Gutenberg Release Process", "slug": "release", "markdown_source": "https://raw.githubusercontent.com/WordPress/gutenberg/master/docs/contributors/release.md", "parent": "develop" }, + { + "title": "Localizing Gutenberg Plugin", + "slug": "localizing", + "markdown_source": "https://raw.githubusercontent.com/WordPress/gutenberg/master/docs/contributors/localizing.md", + "parent": "develop" + }, { "title": "Documentation Contributions", "slug": "document", diff --git a/docs/toc.json b/docs/toc.json index 8d87e52bc8975..774796da6a4fb 100644 --- a/docs/toc.json +++ b/docs/toc.json @@ -85,12 +85,15 @@ {"docs/contributors/reference.md": []} ]}, {"docs/contributors/develop.md": [ + {"docs/contributors/getting-started.md": []}, + {"docs/contributors/git-workflow.md": []}, {"docs/contributors/coding-guidelines.md": []}, {"docs/contributors/testing-overview.md": []}, - {"docs/contributors/git-workflow.md": []}, {"docs/contributors/grammar.md": []}, {"docs/contributors/scripts.md": []}, - {"docs/contributors/release.md": []} + {"docs/contributors/managing-packages.md": []}, + {"docs/contributors/release.md": []}, + {"docs/contributors/localizing.md": []} ]}, {"docs/contributors/document.md": [ {"docs/contributors/copy-guide.md": []} From b59c336c29c67bfbb88761e92ac3ea72bba3b8fb Mon Sep 17 00:00:00 2001 From: Grzegorz Ziolkowski Date: Thu, 25 Apr 2019 18:07:07 +0200 Subject: [PATCH 2/2] Update links to getting started section --- docs/contributors/coding-guidelines.md | 2 +- docs/contributors/testing-overview.md | 6 +++--- .../developers/tutorials/javascript/js-build-setup.md | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/contributors/coding-guidelines.md b/docs/contributors/coding-guidelines.md index 01daee8c386f3..bb763af00018b 100644 --- a/docs/contributors/coding-guidelines.md +++ b/docs/contributors/coding-guidelines.md @@ -201,6 +201,6 @@ alert( `My name is ${ name }.` ); We use [`phpcs` (PHP\_CodeSniffer)](https://github.com/squizlabs/PHP_CodeSniffer) with the [WordPress Coding Standards ruleset](https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards) to run a lot of automated checks against all PHP code in this project. This ensures that we are consistent with WordPress PHP coding standards. -The easiest way to use PHPCS is [local environment](https://github.com/WordPress/gutenberg/blob/master/CONTRIBUTING.md#local-environment). Once that's installed, you can check your PHP by running `npm run lint-php`. +The easiest way to use PHPCS is [local environment](/docs/contributors/getting-started.md#local-environment). Once that's installed, you can check your PHP by running `npm run lint-php`. If you prefer to install PHPCS locally, you should use `composer`. [Install `composer`](https://getcomposer.org/download/) on your computer, then run `composer install`. This will install `phpcs` and `WordPress-Coding-Standards` which you can the run via `vendor/bin/phpcs`. diff --git a/docs/contributors/testing-overview.md b/docs/contributors/testing-overview.md index 6992bd664c3ec..0133f1792aced 100644 --- a/docs/contributors/testing-overview.md +++ b/docs/contributors/testing-overview.md @@ -21,7 +21,7 @@ When writing tests consider the following: Tests for JavaScript use [Jest](https://jestjs.io/) as the test runner and its API for [globals](https://jestjs.io/docs/en/api.html) (`describe`, `test`, `beforeEach` and so on) [assertions](https://jestjs.io/docs/en/expect.html), [mocks](https://jestjs.io/docs/en/mock-functions.html), [spies](https://jestjs.io/docs/en/jest-object.html#jestspyonobject-methodname) and [mock functions](https://jestjs.io/docs/en/mock-function-api.html). If needed, you can also use [Enzyme](https://github.com/airbnb/enzyme) for React component testing. -Assuming you've followed the [instructions](https://github.com/WordPress/gutenberg/blob/master/CONTRIBUTING.md) to install Node and project dependencies, tests can be run from the command-line with NPM: +Assuming you've followed the [instructions](/docs/contributors/getting-started.md) to install Node and project dependencies, tests can be run from the command-line with NPM: ``` npm test @@ -344,7 +344,7 @@ It's tempting to snapshot deep renders, but that makes for huge snapshots. Addit ## End to end Testing -If you're using the built-in [local environment](https://github.com/WordPress/gutenberg/blob/master/CONTRIBUTING.md#local-environment), you can run the e2e tests locally using this command: +If you're using the built-in [local environment](/docs/contributors/getting-started.md#local-environment), you can run the e2e tests locally using this command: ```bash npm run test-e2e @@ -370,7 +370,7 @@ WP_BASE_URL=http://localhost:8888 WP_USERNAME=admin WP_PASSWORD=password npm run ## PHP Testing -Tests for PHP use [PHPUnit](https://phpunit.de/) as the testing framework. If you're using the built-in [local environment](https://github.com/WordPress/gutenberg/blob/master/CONTRIBUTING.md#local-environment), you can run the PHP tests locally using this command: +Tests for PHP use [PHPUnit](https://phpunit.de/) as the testing framework. If you're using the built-in [local environment](/docs/contributors/getting-started.md#local-environment), you can run the PHP tests locally using this command: ```bash npm run test-php diff --git a/docs/designers-developers/developers/tutorials/javascript/js-build-setup.md b/docs/designers-developers/developers/tutorials/javascript/js-build-setup.md index 2c311b513751a..2e6b1f4d21a41 100644 --- a/docs/designers-developers/developers/tutorials/javascript/js-build-setup.md +++ b/docs/designers-developers/developers/tutorials/javascript/js-build-setup.md @@ -2,7 +2,7 @@ This page covers how to set up your development environment to use the ESNext and [JSX](https://reactjs.org/docs/introducing-jsx.html) syntaxes. ESNext is JavaScript code written using features that are only available in a specification greater than ECMAScript 5 (ES5 for short). JSX is a custom syntax extension to JavaScript which helps you to describe what the UI should look like. -This documentation covers development for your plugin to work with Gutenberg. If you want to setup a development environment for developing Gutenberg itself, see the [CONTRIBUTING.md](https://github.com/WordPress/gutenberg/blob/master/CONTRIBUTING.md) documentation. +This documentation covers development for your plugin to work with Gutenberg. If you want to setup a development environment for developing Gutenberg itself, see the [Getting Started](/docs/contributors/getting-started.md) documentation. Most browsers can not interpret or run ESNext and JSX syntaxes, so we use a transformation step to convert these syntaxes to code that browsers can understand.