How to exclude multiple folders in Apigen?

What is the correct CLI syntax for excluding multiple folders in ApiGen?

I tried to separate them with a comma, but this was ignored (maybe read as one path):

H:\SERVER>php apigen.phar generate --source [PATH] --destination [PATH] --exclude [PATH]*,[PATH]*
+4
source share
4 answers

Using a terminal, I suppose you could do:

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

(its the same behavior with multiple sources)

I am trying to exclude multiple folders in a .conf file, when I have an answer, I will update this answer: D, hope this helps.

- Update -

To add multiple sources and / or multiple exceptions to a configuration file:

# Source file or directory to parse
source:
    # ../PASTA
    - ../sys
    - ../anotherfolder
# Directory where to save the generated documentation
destination: 'C:\xampp\htdocs\yourfolder'
# 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.

And to run the configuration file:

 apigen generate --config file.conf
+1
source

, , (Vendor, Config X)

:

php apigen.phar generate - source [YOUR-SOURCE-PATH] - [DESTINATION-PATH] --skip-doc-path "*/Vendor *" --skip-doc-path "*/Config *" --skip-doc-path "*/Docs/X *"

Linux:

apigen generate -s [YOUR-SOURCE-PATH] -d [DESTINATION-PATH] --skip-doc-path "*/Vendor *" --skip-doc-path "*/Config *" --skip -doc-path "*/Docs/X *"

0

APIGEN - :

- ///

, , . --exclude/path/to/folder/, , --exclude/path/to/folder/*, .

0

Use your ways relatively --source. For example, if your sources are in /Users/abc/www, and you want to exclude folders /Users/abc/www/aand /Users/abc/www/band let's say a /Users/abc/www/tests/test.phpfile, use the command as shown below:

php apigen.phar generate --source /Users/abc/www --destination /Users/abc/docs --exclude a,b,tests/test.php

no slash or wildcard. Separate them with commas. worked for me.

0
source

Source: https://habr.com/ru/post/1608860/


All Articles