File tree Expand file tree Collapse file tree 2 files changed +35
-5
lines changed
Expand file tree Collapse file tree 2 files changed +35
-5
lines changed Original file line number Diff line number Diff line change 22
33MoChat 插件创建器
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# # 感谢:
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments