Skip to content

Commit afa90e9

Browse files
authored
Merge pull request #186 from ernilambar/update/package-docs
2 parents fe5657f + 8b57210 commit afa90e9

File tree

2 files changed

+50
-42
lines changed

2 files changed

+50
-42
lines changed

README.md

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,19 @@ WP-CLI packages are community-maintained projects built on WP-CLI. They can
2323
contain WP-CLI commands, but they can also just extend WP-CLI in some way.
2424

2525
Learn how to create your own command from the
26-
[Commands Cookbook](https://make.wordpress.org/cli/handbook/commands-cookbook/)
26+
[Commands Cookbook](https://make.wordpress.org/cli/handbook/guides/commands-cookbook/)
2727

2828
**EXAMPLES**
2929

30-
# List installed packages
30+
# List installed packages.
3131
$ wp package list
32-
+-----------------------+------------------------------------------+---------+----------+
33-
| name | description | authors | version |
34-
+-----------------------+------------------------------------------+---------+----------+
35-
| wp-cli/server-command | Start a development server for WordPress | | dev-main |
36-
+-----------------------+------------------------------------------+---------+----------+
32+
+-----------------------+------------------+----------+-----------+----------------+
33+
| name | authors | version | update | update_version |
34+
+-----------------------+------------------+----------+-----------+----------------+
35+
| wp-cli/server-command | Daniel Bachhuber | dev-main | available | 2.x-dev |
36+
+-----------------------+------------------+----------+-----------+----------------+
3737

38-
# Install the latest development version of the package
38+
# Install the latest development version of the package.
3939
$ wp package install wp-cli/server-command
4040
Installing package wp-cli/server-command (dev-main)
4141
Updating /home/person/.wp-cli/packages/composer.json to require the package...
@@ -53,11 +53,11 @@ Learn how to create your own command from the
5353
---
5454
Success: Package installed.
5555

56-
# Uninstall package
56+
# Uninstall package.
5757
$ wp package uninstall wp-cli/server-command
58-
Removing require statement from /home/person/.wp-cli/packages/composer.json
59-
Deleting package directory /home/person/.wp-cli/packages/vendor/wp-cli/server-command
60-
Regenerating Composer autoload.
58+
Removing require statement for package 'wp-cli/server-command' from /home/person/.wp-cli/packages/composer.json
59+
Removing repository details from /home/person/.wp-cli/packages/composer.json
60+
Removing package directories and regenerating autoloader...
6161
Success: Uninstalled package.
6262

6363

@@ -225,12 +225,13 @@ These fields are optionally available:
225225

226226
**EXAMPLES**
227227

228+
# List installed packages.
228229
$ wp package list
229-
+-----------------------+------------------------------------------+---------+----------+
230-
| name | description | authors | version |
231-
+-----------------------+------------------------------------------+---------+----------+
232-
| wp-cli/server-command | Start a development server for WordPress | | dev-main |
233-
+-----------------------+------------------------------------------+---------+----------+
230+
+-----------------------+------------------+----------+-----------+----------------+
231+
| name | authors | version | update | update_version |
232+
+-----------------------+------------------+----------+-----------+----------------+
233+
| wp-cli/server-command | Daniel Bachhuber | dev-main | available | 2.x-dev |
234+
+-----------------------+------------------+----------+-----------+----------------+
234235

235236

236237

@@ -278,10 +279,11 @@ wp package uninstall <name> [--insecure]
278279

279280
**EXAMPLES**
280281

282+
# Uninstall package.
281283
$ wp package uninstall wp-cli/server-command
282-
Removing require statement from /home/person/.wp-cli/packages/composer.json
283-
Deleting package directory /home/person/.wp-cli/packages/vendor/wp-cli/server-command
284-
Regenerating Composer autoload.
284+
Removing require statement for package 'wp-cli/server-command' from /home/person/.wp-cli/packages/composer.json
285+
Removing repository details from /home/person/.wp-cli/packages/composer.json
286+
Removing package directories and regenerating autoloader...
285287
Success: Uninstalled package.
286288

287289
## Installing

src/Package_Command.php

Lines changed: 28 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,19 @@
2929
* contain WP-CLI commands, but they can also just extend WP-CLI in some way.
3030
*
3131
* Learn how to create your own command from the
32-
* [Commands Cookbook](https://make.wordpress.org/cli/handbook/commands-cookbook/)
32+
* [Commands Cookbook](https://make.wordpress.org/cli/handbook/guides/commands-cookbook/)
3333
*
3434
* ## EXAMPLES
3535
*
36-
* # List installed packages
36+
* # List installed packages.
3737
* $ wp package list
38-
* +-----------------------+------------------------------------------+---------+----------+
39-
* | name | description | authors | version |
40-
* +-----------------------+------------------------------------------+---------+----------+
41-
* | wp-cli/server-command | Start a development server for WordPress | | dev-main |
42-
* +-----------------------+------------------------------------------+---------+----------+
38+
* +-----------------------+------------------+----------+-----------+----------------+
39+
* | name | authors | version | update | update_version |
40+
* +-----------------------+------------------+----------+-----------+----------------+
41+
* | wp-cli/server-command | Daniel Bachhuber | dev-main | available | 2.x-dev |
42+
* +-----------------------+------------------+----------+-----------+----------------+
4343
*
44-
* # Install the latest development version of the package
44+
* # Install the latest development version of the package.
4545
* $ wp package install wp-cli/server-command
4646
* Installing package wp-cli/server-command (dev-main)
4747
* Updating /home/person/.wp-cli/packages/composer.json to require the package...
@@ -59,11 +59,11 @@
5959
* ---
6060
* Success: Package installed.
6161
*
62-
* # Uninstall package
62+
* # Uninstall package.
6363
* $ wp package uninstall wp-cli/server-command
64-
* Removing require statement from /home/person/.wp-cli/packages/composer.json
65-
* Deleting package directory /home/person/.wp-cli/packages/vendor/wp-cli/server-command
66-
* Regenerating Composer autoload.
64+
* Removing require statement for package 'wp-cli/server-command' from /home/person/.wp-cli/packages/composer.json
65+
* Removing repository details from /home/person/.wp-cli/packages/composer.json
66+
* Removing package directories and regenerating autoloader...
6767
* Success: Uninstalled package.
6868
*
6969
* @package WP-CLI
@@ -450,12 +450,13 @@ public function install( $args, $assoc_args ) {
450450
*
451451
* ## EXAMPLES
452452
*
453+
* # List installed packages.
453454
* $ wp package list
454-
* +-----------------------+------------------------------------------+---------+----------+
455-
* | name | description | authors | version |
456-
* +-----------------------+------------------------------------------+---------+----------+
457-
* | wp-cli/server-command | Start a development server for WordPress | | dev-main |
458-
* +-----------------------+------------------------------------------+---------+----------+
455+
* +-----------------------+------------------+----------+-----------+----------------+
456+
* | name | authors | version | update | update_version |
457+
* +-----------------------+------------------+----------+-----------+----------------+
458+
* | wp-cli/server-command | Daniel Bachhuber | dev-main | available | 2.x-dev |
459+
* +-----------------------+------------------+----------+-----------+----------------+
459460
*
460461
* @subcommand list
461462
*/
@@ -476,11 +477,15 @@ public function list_( $args, $assoc_args ) {
476477
*
477478
* ## EXAMPLES
478479
*
479-
* # Get package path
480+
* # Get package path.
480481
* $ wp package path
481482
* /home/person/.wp-cli/packages/
482483
*
483-
* # Change directory to package path
484+
* # Get path to an installed package.
485+
* $ wp package path wp-cli/server-command
486+
* /home/person/.wp-cli/packages/vendor/wp-cli/server-command
487+
*
488+
* # Change directory to package path.
484489
* $ cd $(wp package path) && pwd
485490
* /home/vagrant/.wp-cli/packages
486491
*/
@@ -559,10 +564,11 @@ public function update() {
559564
*
560565
* ## EXAMPLES
561566
*
567+
* # Uninstall package.
562568
* $ wp package uninstall wp-cli/server-command
563-
* Removing require statement from /home/person/.wp-cli/packages/composer.json
564-
* Deleting package directory /home/person/.wp-cli/packages/vendor/wp-cli/server-command
565-
* Regenerating Composer autoload.
569+
* Removing require statement for package 'wp-cli/server-command' from /home/person/.wp-cli/packages/composer.json
570+
* Removing repository details from /home/person/.wp-cli/packages/composer.json
571+
* Removing package directories and regenerating autoloader...
566572
* Success: Uninstalled package.
567573
*/
568574
public function uninstall( $args, $assoc_args ) {

0 commit comments

Comments
 (0)