Skip to content

Commit 3232660

Browse files
committed
Updated documentation for “scaffold package-readme.”
The edit is in accordance with discussion at #270.
1 parent 233838d commit 3232660

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

src/ScaffoldPackageCommand.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,23 @@ public function package( $args, $assoc_args ) {
176176
* }
177177
* ```
178178
*
179+
* **Important:** for the `package-readme` subcommand to work properly, your
180+
* package must be loaded by WP CLI. You may load your package in one of two
181+
* ways:
182+
*
183+
* * install the package locally (e.g., from the filesystem via `wp package install /path/to/package`)
184+
* * add a `wp-cli.yml` file in your project directory requiring your package. Here's an example:
185+
*
186+
* ```
187+
* require:
188+
* - your-package.php
189+
* ```
190+
*
191+
* If your project uses [Composer](https://getcomposer.org)'s autoloader
192+
* and your package is not installed locally, you'll need to generate the
193+
* necessary autoload files by running `composer dump-autoload` in the
194+
* project directory.
195+
*
179196
* You can also customize the rendering of README.md generally with
180197
* composer.json -> 'extra' -> 'readme'. For example, runcommand/hook's
181198
* composer.json includes:

0 commit comments

Comments
 (0)