diff --git a/.readme-partials/DEVELOPMENT.md b/.readme-partials/DEVELOPMENT.md index e8d20ce..817d609 100644 --- a/.readme-partials/DEVELOPMENT.md +++ b/.readme-partials/DEVELOPMENT.md @@ -1,4 +1,10 @@ Every subfolder is a proper clone of the corresponding GitHub repository. This means that you can create new branches, make your changes, commit to the new branch and then submit as pull-request, all from within these folders. -As the folders are also symlinked into the Composer `vendor` folder, you will always have the latest changes available when running WP-CLI through the `vendor/bin/wp` executable. +Unless you have commit access to the repository, you'll need to fork the repository in order to push your feature branch. [GitHub's CLI](https://github.com/cli/cli) is pretty helpful for this: + +```bash +cd core-command +gh repo fork +``` +As the folders are also symlinked into the Composer `vendor` folder, you will always have the latest changes available when running WP-CLI through the `vendor/bin/wp` executable. diff --git a/.readme-partials/INSTALLATION.md b/.readme-partials/INSTALLATION.md index d66811a..d4d062e 100644 --- a/.readme-partials/INSTALLATION.md +++ b/.readme-partials/INSTALLATION.md @@ -1,13 +1,18 @@ -Clone this repository onto your hard drive and then use Composer to install all dependencies: +If you normally use WP-CLI on your web host or via Brew, you're most likely using the Phar executable (`wp-cli.phar`). This Phar executable file is the "built", singular version of WP-CLI. It is compiled from a couple dozen repositories in the WP-CLI GitHub organization. -``` -git clone https://github.com/wp-cli/wp-cli-dev -cd wp-cli-dev -composer install -``` - -This will: +In order to make code changes to WP-CLI, you'll need to set up this `wp-cli-dev` development environment on your local machine. The setup process will: 1. Clone all relevant packages from the `wp-cli` GitHub organization into the `wp-cli-dev` folder, and 2. Install all Composer dependencies for a complete `wp-cli-bundle` setup, while symlinking all of the previously cloned packages into the Composer `vendor` folder. 3. Symlink all folder in `vendor` into corresponding `vendor` folders in each repository, thus making the centralized functionality based on Composer available in each repository subfolder. + +Before you can proceed further, you'll need to make sure you have [Composer](https://getcomposer.org/), PHP, and a functioning MySQL or MariaDB server on your local machine. + +Once the prequisites are met, clone the GitHub repository and run the installation process: + +```bash +git clone https://github.com/wp-cli/wp-cli-dev wp-cli-dev +cd wp-cli-dev +composer install +composer prepare-tests +``` diff --git a/README.md b/README.md index 47da595..5e9df3f 100644 --- a/README.md +++ b/README.md @@ -11,24 +11,36 @@ Quick links: [Installation](#installation) | [Development](#development) | [Usin ## Installation -Clone this repository onto your hard drive and then use Composer to install all dependencies: +If you normally use WP-CLI on your web host or via Brew, you're most likely using the Phar executable (`wp-cli.phar`). This Phar executable file is the "built", singular version of WP-CLI. It is compiled from a couple dozen repositories in the WP-CLI GitHub organization. -``` -git clone https://github.com/wp-cli/wp-cli-dev -cd wp-cli-dev -composer install -``` - -This will: +In order to make code changes to WP-CLI, you'll need to set up this `wp-cli-dev` development environment on your local machine. The setup process will: 1. Clone all relevant packages from the `wp-cli` GitHub organization into the `wp-cli-dev` folder, and 2. Install all Composer dependencies for a complete `wp-cli-bundle` setup, while symlinking all of the previously cloned packages into the Composer `vendor` folder. 3. Symlink all folder in `vendor` into corresponding `vendor` folders in each repository, thus making the centralized functionality based on Composer available in each repository subfolder. +Before you can proceed further, you'll need to make sure you have [Composer](https://getcomposer.org/), PHP, and a functioning MySQL or MariaDB server on your local machine. + +Once the prequisites are met, clone the GitHub repository and run the installation process: + +```bash +git clone https://github.com/wp-cli/wp-cli-dev wp-cli-dev +cd wp-cli-dev +composer install +composer prepare-tests +``` + ## Development Every subfolder is a proper clone of the corresponding GitHub repository. This means that you can create new branches, make your changes, commit to the new branch and then submit as pull-request, all from within these folders. +Unless you have commit access to the repository, you'll need to fork the repository in order to push your feature branch. [GitHub's CLI](https://github.com/cli/cli) is pretty helpful for this: + +```bash +cd core-command +gh repo fork +``` + As the folders are also symlinked into the Composer `vendor` folder, you will always have the latest changes available when running WP-CLI through the `vendor/bin/wp` executable. ## Using