加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长学院 > PHP教程 > 正文

php – 如何在Apigen中排除多个文件夹?

发布时间:2020-12-13 15:58:05 所属栏目:PHP教程 来源:网络整理
导读:CLI在ApiGen中排除多个文件夹的正确语法是什么? 我尝试用逗号分隔它们,但这被忽略了(可能读作一条路径): H:SERVERphp apigen.phar generate --source [PATH] --destination [PATH] --exclude [PATH]*,[PATH]* 解决方法 使用终端,我想你可以这样做: php a
CLI在ApiGen中排除多个文件夹的正确语法是什么?

我尝试用逗号分隔它们,但这被忽略了(可能读作一条路径):

H:SERVER>php apigen.phar generate --source [PATH] --destination [PATH] --exclude [PATH]*,[PATH]*

解决方法

使用终端,我想你可以这样做:

php apigen.phar generate --source xxx --destination xxx --exclude folder_to_excluse --exlude yet_another_folder

(与多个来源的行为相同)

我试图在.conf文件中排除多个文件夹,当我得到答案时我会更新这个答案:D,希望它有所帮助.

– 更新 –

要从配置文件添加多个源和/或多个排除引用,请执行以下操作:

# Source file or directory to parse
source:
    # ../PASTA
    - ../sys
    - ../anotherfolder
# Directory where to save the generated documentation
destination: 'C:xampphtdocsyourfolder'
# List of allowed file extensions
extensions: [php]
# Mask to exclude file or directory from processing
exclude: 
    - '../sys/vendor'
    - '..sys/core'
#next elements of the config file.

并运行配置文件:

apigen generate --config file.conf

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读