Skip to content

Commit 09ca77f

Browse files
committed
[文档修改](master): 修改插件安装器使用说明,增加插件目录示例
1 parent 7de1438 commit 09ca77f

File tree

2 files changed

+35
-5
lines changed

2 files changed

+35
-5
lines changed

README.md

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,44 @@
22

33
MoChat 插件创建器
44

5-
## 使用方式
5+
## 使用方式
66

77
```shell script
8+
# 先进入 api-server 目录
9+
cd /www/wwwroot/mochat/api-server
10+
# 比如要创建一个 maxincai/demo 的插件
11+
# plugin/maxincai/demo
12+
# plugin 表示插件目录
13+
# maxincai 一般为开发者github账号/composer 作者名
14+
# demo 为插件名称
815
# 执行命令根据提示一步步操作即可
9-
composer create-project mochat/plugin-creater
16+
composer create-project mochat/plugin-creater plugin/maxincai/demo
17+
```
18+
19+
## 插件目录示例
20+
```shell script
21+
# 执行成功后就会得到一下如下结构的插件
22+
plugin/maxincai/demo/
23+
|-- composer.json
24+
|-- LICENSE
25+
|-- phpunit.xml
26+
|-- README.md
27+
|-- src
28+
| |-- ConfigProvider.php
29+
| |-- Action-------------------------------------- 动作目录(控制器)
30+
| |-- Constants----------------------------------- 常量目录
31+
| |-- Contract------------------------------------ 服务接口契约目录
32+
| |-- Event--------------------------------------- 事件目录
33+
| |-- Job----------------------------------------- 异步任务目录
34+
| |-- Listener------------------------------------ 事件监听器目录
35+
| |-- Logic--------------------------------------- 业务逻辑目录
36+
| |-- Model--------------------------------------- 模型目录
37+
| |-- Queue--------------------------------------- 异步队列目录
38+
| |-- Service------------------------------------- 服务目录
39+
| `-- Task---------------------------------------- 定时任务目录
40+
`-- tests
41+
|-- bootstrap.php
42+
`-- Cases
1043
```
1144

1245
## 感谢:

installer/OptionalPackages.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -425,13 +425,10 @@ public function cleanUp(): void
425425
{
426426
foreach ($this->assetsToRemove as $target) {
427427
$target = $this->projectRoot . $target;
428-
var_dump($target);
429428
if (file_exists($target)) {
430-
var_dump(11111);
431429
unlink($target);
432430
}
433431
}
434-
var_dump($this->projectRoot . 'vendor');
435432
$this->recursiveRmdir($this->projectRoot . 'vendor');
436433
}
437434

0 commit comments

Comments
 (0)