Skip to content

Latest commit

 

History

History
33 lines (26 loc) · 1.55 KB

README.md

File metadata and controls

33 lines (26 loc) · 1.55 KB

apidoc-core

apidoc支持 -i参数指明要解析的目录, -f参数应用正则的文件匹配过滤器;其中进行-f文件匹配过滤的源串是文件的绝对路径(带文件类型后缀)【不要以为匹配的串是-i目录下的纯文件名】, 写正则表达式时这点需要注意

举样例,录入你想为每一个入口文件生成一个api访问路径, 如下-f 内容中起始的"/"就显得比较关键,否则输出结果可能多于单个入口文件的内容


cd /usr/local/nginx/web_modules/action
for dir in $(ls)
do
if [ -d $dir ] && [ ! -L $dir ];then
    for file in $(ls $dir)
    do
        pureName=${file%.*}
        extension=${file##*.}
        if [ $extension == "php" ];then
            #echo $pureName
            apidoc -i /usr/local/nginx/web_modules/action/$dir/ -f "\/$pureName\.php$" -o /usr/local/nginx/web_modules/api/$dir/$pureName
        fi
    done
fi
done

Core parser library to generate apidoc result following the apidoc-spec

Build Status Dependency Status NPM version

If you are an end user, please proceed to apidoc or apidoc-documentation.

Changelog.