You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+11-31Lines changed: 11 additions & 31 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,42 +28,22 @@ compatible with web and CLI environments on PHP 7.2+. There's not much technical
28
28
at this point but you can refer to the [blueprints.php file](https://github.com/WordPress/php-toolkit/blob/219dc4e846af270a5009e523244d0ec23baaa32a/components/Blueprints/bin/blueprint.php#L226) to see
29
29
how the runner is implemented.
30
30
31
-
### Using the libraries
32
-
33
-
Use composer to install the libraries in a non-WordPress project.
34
-
35
-
This is the minimal composer.json file you need to consume the libraries:
You can also lock it in to a specific commit or tag:
33
+
The individual components are now distributed via Composer at [https://packagist.org/packages/wp-php-toolkit](https://packagist.org/packages/wp-php-toolkit). You can install specific components you need rather than the entire toolkit.
53
34
54
-
```json
55
-
{
56
-
"require": {
57
-
"WordPress/php-toolkit": "dev-trunk#122b547"
58
-
}
59
-
}
60
-
```
35
+
To install a specific component, use composer:
61
36
62
-
For now, there is no way to cherry-pick just the one library you need. It's all or nothing.
37
+
```bash
38
+
composer require wp-php-toolkit/http-client
39
+
composer require wp-php-toolkit/data-liberation
40
+
composer require wp-php-toolkit/git
41
+
# ... and so on for other components
42
+
```
63
43
64
-
Note that the composer.json example above downloads more files than the required minimum, e.g. markdowns, unit tests, the `plugins` directory, etc. That's about 50MB of code in total and, most likely, it's not a big deal for your project. If you want a smaller package, the Data Liberation plugin referenced above ships a minified phar file that's about ~500KB compressed.
44
+
#### PHAR distribution
65
45
66
-
If you'd like to install just a single library, you'll need to contribute a PR to distribute each library as a separate package. Most likely, though, you don't really need that. If you have doubts, open a new issue and we'll figure it out together.
46
+
For convenience, a standalone Blueprints runner and other tools from this repository are shipped as phar files available in the [GitHub releases](https://github.com/WordPress/php-toolkit/releases).
0 commit comments