Skip to content

Commit 13f3540

Browse files
committed
update docs & readme
1 parent d48cd68 commit 13f3540

4 files changed

Lines changed: 77 additions & 31 deletions

File tree

PREREQUISITES.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
### Prerequisites
2+
3+
This command leverages [Laravel Valet](https://laravel.com/docs/5.2/valet#installation) -- the development environment for Mac minimalists.
4+
Because of this **support is unfortunately limited to Mac only**.
5+
6+
Follow the [installation instructions](https://laravel.com/docs/5.2/valet#installation) on the Laravel documentation to get started.
7+
This is what makes it possible to load a site in your browser immediately after creating it, without any other configuration.
8+
9+
You will also need some understanding of how Valet works, especially the portion on [Serving Sites](https://laravel.com/docs/5.2/valet#serving-sites).

README.md

Lines changed: 35 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# WP-CLI Valet Command
22

3-
Harness the power of Laravel Valet for creating fully functional WordPress installs in seconds.
3+
White-glove services for turn-key installs in seconds.
44

55
[![Build Status](https://travis-ci.org/aaemnnosttv/wp-cli-valet-command.svg?branch=master)](https://travis-ci.org/aaemnnosttv/wp-cli-valet-command)
66

@@ -15,15 +15,20 @@ This package implements the following commands:
1515
Create a new WordPress install -- fast
1616

1717
~~~
18-
wp valet new <domain> [--project=<project>] [--version=<version>] [--locale=<locale>] [--db=<db>] [--dbname=<dbname>] [--dbuser=<dbuser>] [--dbpass=<dbpass>] [--dbprefix=<dbprefix>] [--admin_user=<username>] [--admin_password=<password>] [--admin_email=<email>] [--unsecure]
18+
wp valet new <name> [--project=<project>] [--version=<version>] [--locale=<locale>] [--db=<db>] [--dbname=<dbname>] [--dbuser=<dbuser>] [--dbpass=<dbpass>] [--dbprefix=<dbprefix>] [--admin_user=<username>] [--admin_password=<password>] [--admin_email=<email>] [--unsecure]
1919
~~~
2020

21+
This command will spin up a new WordPress installation -- complete with database and https
22+
_ready-to-use in your browser_ faster than you can put your pants on.
23+
2124
**OPTIONS**
22-
<domain>
23-
Site domain name without TLD. Eg: example.com = example
25+
26+
<name>
27+
Site domain name without TLD.
28+
Eg: To create an install for example.dev, `wp valet new example`
2429

2530
[--project=<project>]
26-
Composer project to use instead of vanilla WordPress.
31+
The WordPress project to install. Choose from any project supported by Laravel Valet.
2732
---
2833
default: wp
2934
options:
@@ -32,16 +37,16 @@ wp valet new <domain> [--project=<project>] [--version=<version>] [--locale=<loc
3237
---
3338

3439
[--version=<version>]
35-
WordPress version to install
40+
WordPress version to install.
3641
---
3742
default: latest
3843
---
3944

4045
[--locale=<locale>]
41-
Select which language you want to install
46+
Select which language you want to install.
4247

4348
[--db=<db>]
44-
Database driver
49+
Database driver to provision the site with.
4550
---
4651
default: mysql
4752
options:
@@ -50,10 +55,11 @@ wp valet new <domain> [--project=<project>] [--version=<version>] [--locale=<loc
5055
---
5156

5257
[--dbname=<dbname>]
53-
Database name (MySQL only). Default: 'wp_{domain}'
58+
Database name (MySQL only).
59+
Defaults to 'wp_<name>'.
5460

5561
[--dbuser=<dbuser>]
56-
Database User (MySQL only)
62+
Database User (MySQL only).
5763
---
5864
default: root
5965
---
@@ -65,7 +71,7 @@ wp valet new <domain> [--project=<project>] [--version=<version>] [--locale=<loc
6571
---
6672

6773
[--dbprefix=<dbprefix>]
68-
Set the database table prefix. Default: 'wp_'
74+
Set the database table prefix.
6975
---
7076
default: 'wp_'
7177
---
@@ -92,22 +98,37 @@ wp valet new <domain> [--project=<project>] [--version=<version>] [--locale=<loc
9298

9399
### wp valet destroy
94100

95-
Blow away an installation.
101+
Completely remove an installation.
96102

97103
~~~
98104
wp valet destroy <name> [--yes]
99105
~~~
100106

107+
This will drop the database, and delete all of the files as well as
108+
remove any self-signed TLS certificate that was generated for serving
109+
this install over https.
110+
101111
**OPTIONS**
102112

103113
<name>
104-
Site domain name without TLD. Eg: example.com = example
114+
Site domain name without TLD.
115+
Eg: To create an install for example.dev, `wp valet new example`
105116

106117
[--yes]
107-
Pre-approve the confirmation to delete all files and drop database.
118+
Pre-approve the confirmation to delete all files and drop the database.
108119

109120
## Installing
110121

122+
### Prerequisites
123+
124+
This command leverages [Laravel Valet](https://laravel.com/docs/5.2/valet#installation) -- the development environment for Mac minimalists.
125+
Because of this **support is unfortunately limited to Mac only**.
126+
127+
Follow the [installation instructions](https://laravel.com/docs/5.2/valet#installation) on the Laravel documentation to get started.
128+
This is what makes it possible to load a site in your browser immediately after creating it, without any other configuration.
129+
130+
You will also need some understanding of how Valet works, especially the portion on [Serving Sites](https://laravel.com/docs/5.2/valet#serving-sites).
131+
111132
Installing this package requires WP-CLI v0.23.0 or greater. Update to the latest stable release with `wp cli update`.
112133

113134
Once you've done so, you can install this package with `wp package install aaemnnosttv/wp-cli-valet-command`.

composer.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "aaemnnosttv/wp-cli-valet-command",
3-
"description": "Harness the power of Laravel Valet for creating fully functional WordPress installs in seconds.",
3+
"description": "White-glove services for turn-key installs in seconds.",
44
"keywords": ["wordpress", "laravel", "valet", "zonda"],
55
"license": "MIT",
66
"authors": [
@@ -39,6 +39,11 @@
3939
"commands": [
4040
"valet new",
4141
"valet destroy"
42-
]
42+
],
43+
"readme": {
44+
"installing": {
45+
"pre": "PREREQUISITES.md"
46+
}
47+
}
4348
}
4449
}

src/ValetCommand.php

Lines changed: 26 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
use WP_CLI_Valet\Process\SystemWp;
1515

1616
/**
17-
* Zonda is golden.
17+
* White-glove turn-key install services.
1818
*/
1919
class ValetCommand
2020
{
@@ -56,12 +56,17 @@ public static function boot()
5656
/**
5757
* Create a new WordPress install -- fast
5858
*
59+
* This command will spin up a new WordPress installation -- complete with database and https
60+
* _ready-to-use in your browser_ faster than you can put your pants on.
61+
*
5962
* ## OPTIONS
60-
* <domain>
61-
* : Site domain name without TLD. Eg: example.com = example
63+
*
64+
* <name>
65+
* : Site domain name without TLD.
66+
* Eg: To create an install for example.dev, `wp valet new example`
6267
*
6368
* [--project=<project>]
64-
* : Composer project to use instead of vanilla WordPress.
69+
* : The WordPress project to install. Choose from any project supported by Laravel Valet.
6570
* ---
6671
* default: wp
6772
* options:
@@ -70,16 +75,16 @@ public static function boot()
7075
* ---
7176
*
7277
* [--version=<version>]
73-
* : WordPress version to install
78+
* : WordPress version to install.
7479
* ---
7580
* default: latest
7681
* ---
7782
*
7883
* [--locale=<locale>]
79-
* : Select which language you want to install
84+
* : Select which language you want to install.
8085
*
8186
* [--db=<db>]
82-
* : Database driver
87+
* : Database driver to provision the site with.
8388
* ---
8489
* default: mysql
8590
* options:
@@ -88,10 +93,11 @@ public static function boot()
8893
* ---
8994
*
9095
* [--dbname=<dbname>]
91-
* : Database name (MySQL only). Default: 'wp_{domain}'
96+
* : Database name (MySQL only).
97+
* Defaults to 'wp_<name>'.
9298
*
9399
* [--dbuser=<dbuser>]
94-
* : Database User (MySQL only)
100+
* : Database User (MySQL only).
95101
* ---
96102
* default: root
97103
* ---
@@ -103,7 +109,7 @@ public static function boot()
103109
* ---
104110
*
105111
* [--dbprefix=<dbprefix>]
106-
* : Set the database table prefix. Default: 'wp_'
112+
* : Set the database table prefix.
107113
* ---
108114
* default: 'wp_'
109115
* ---
@@ -128,7 +134,7 @@ public static function boot()
128134
*
129135
* @subcommand new
130136
*
131-
* @when before_wp_load
137+
* @when before_wp_load
132138
*
133139
* @param $args
134140
* @param $assoc_args
@@ -164,17 +170,22 @@ public function _new($args, $assoc_args)
164170
}
165171

166172
/**
167-
* Blow away an installation.
173+
* Completely remove an installation.
174+
*
175+
* This will drop the database, and delete all of the files as well as
176+
* remove any self-signed TLS certificate that was generated for serving
177+
* this install over https.
168178
*
169179
* ## OPTIONS
170180
*
171181
* <name>
172-
* : Site domain name without TLD. Eg: example.com = example
182+
* : Site domain name without TLD.
183+
* Eg: To create an install for example.dev, `wp valet new example`
173184
*
174185
* [--yes]
175-
* : Pre-approve the confirmation to delete all files and drop database.
186+
* : Pre-approve the confirmation to delete all files and drop the database.
176187
*
177-
* @when before_wp_load
188+
* @when before_wp_load
178189
*
179190
* @param $args
180191
* @param $assoc_args

0 commit comments

Comments
 (0)