Adding Composer dependency management to WP CLI.
将Composer依赖性管理添加到WP CLI。
Allows you to recursivly install/update composer packages inside of all of your WordPress plugins and themes.
允许您在所有WordPress插件和主题内递归安装/更新composer软件包。 p>
What is this using?
这是做什么用的? h3>
This package uses a great piece of software called WP-CLI.
此软件包使用了一个名为 WP-CLI 的出色软件。
It provides a command line interface for WordPress management.
它提供了用于WordPress管理的命令行界面。
We are a plugin providing Composer management inside of WP CLI.
我们是一个可在WP CLI内部提供Composer管理的插件。 p>
What’s Composer?
什么是作曲家? h3>
It’s the greatest thing to happen to the web since GIFs, Drop Shadows and dancing cats.
自GIF,投影和跳舞猫以来,这是网络上发生的最糟糕的事情。
Composer is a dead simple JSON-based dependency manager for PHP.
Composer是PHP的简单的基于JSON的依赖管理器。
For more information, check out http://getcomposer.org/.
有关更多信息,请查看 http://getcomposer.org/ 。 p>
So this is complete Composer support?
这是对Composer的完整支持吗? h3>
No, not exactly!
不,不完全是!
Sadly, I’m building this out and I’m trying to make some sweet WP-CLI and Composer integration.
可悲的是,我正在扩展它,并尝试进行一些不错的WP-CLI和Composer集成。
But for now, we only support a few command:
但目前,我们仅支持一些命令: p>
- install
- 安装 li>
- update
- 更新 li>
- diagnose
- 诊断 li>
- help
- 帮助 li>
- status
- 状态 li>
ul>
If you’d love to help out, please help!
如果您想提供帮助,请提供帮助!
Make a pull request and let’s get coding!
发出拉取请求,让我们开始编码! p>
How do I build Composer Management inside of my plugin?
如何在插件内部构建Composer Management? h3>
Simple really!
真的很简单!
You just create a simple composer.json
file like you would with any Composer project.
您只需像创建任何Composer项目一样创建一个简单的 composer.json code>文件。From there, wp-composer will interface with each plugin/theme that has composer support and it will generate the autoload files, too!
从那里,wp-composer将与支持作曲家的每个插件/主题进行交互,并且还将生成自动加载文件! p>
Just include something like this inside your main plugin file:
只需在主插件文件中包含以下内容: p>
require(__DIR__.'/vendor/autoload.php'); require(__ DIR __。'/ vendor / autoload.php');
code> pre>
It’s that simple.
就这么简单。 p>