Skip to content

Commit

Permalink
Update wp-cli documentation (#152)
Browse files Browse the repository at this point in the history
- Cache is now a subcommand of project
- Document `wp traduttore project list`
  • Loading branch information
grappler authored Mar 14, 2019
1 parent ba2340f commit 147bcdc
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
9 changes: 8 additions & 1 deletion docs/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Removes the cached source code repository for a given project.
Useful when the local repository was somehow corrupted.

```bash
wp traduttore cache clear <project|repository_url>
wp traduttore project cache clear <project|repository_url>
````

## Show various details about a project
Expand All @@ -56,6 +56,13 @@ This includes things like the text domain and repository URLs.
wp traduttore project info <project|repository_url>
```
## List project language packs
List language packs for the given project.
```bash
wp traduttore project list <project|repository_url>
````
## Show various details about the environment
Expand Down
6 changes: 3 additions & 3 deletions inc/CLI/CacheCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ class CacheCommand extends WP_CLI_Command {
* ## EXAMPLES
*
* # Remove cached repository.
* $ wp traduttore cache clear https://github.com/wearerequired/required-valencia
* $ wp traduttore project cache clear https://github.com/wearerequired/required-valencia
* Success: Removed cached Git repository for project (ID: 123)!
*
* # Remove cached repository for given project path.
* $ wp traduttore cache clear required/required-valencia
* $ wp traduttore project cache clear required/required-valencia
* Success: Removed cached Git repository for project (ID: 123)!
*
* # Remove cached repository for given project ID.
* $ wp traduttore cache clear 123
* $ wp traduttore project cache clear 123
* Success: Removed cached Git repository for project (ID: 123)!
*
* @since 2.0.0
Expand Down
2 changes: 1 addition & 1 deletion inc/CLI/CommandNamespace.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
* Success: Language pack generation finished
*
* # Remove cached repository for given project ID.
* $ wp traduttore cache clear 123
* $ wp traduttore project cache clear 123
* Success: Removed cached Git repository for project (ID: 123)!
*/
class CommandNamespace extends \WP_CLI\Dispatcher\CommandNamespace {
Expand Down

0 comments on commit 147bcdc

Please sign in to comment.