3

我编写了一个简单的可重用控件,并在寻找一种记录其功能和属性的方法时,我发现了这个有用的工具——appledoc。

我创建了一个演示项目来展示我的控件的功能。现在,当我使用 appledoc 生成文档时,它也为演示类创建了引用。我不想要这个。我期望 appledoc 仅为我的可重用类生成文档。我怎么能那样做?

我的脚本是这样的:

APPLEDOC_PATH=`which appledoc`
if [ $APPLEDOC_PATH ]; then
$APPLEDOC_PATH \
--project-name "MyControl" \
--project-company "Company Name" \
--company-id "" \
--output ${PRODUCT_NAME}Docs \
--keep-undocumented-objects \
--keep-undocumented-members \
--keep-intermediate-files \
--no-repeat-first-par \
--no-warn-invalid-crossref \
--ignore "*.m,AppDelegate.h,ViewController.h" \
--exit-threshold 2 \
${PROJECT_DIR}/${PRODUCT_NAME}
fi;

尝试在 --ignore 标记中添加我的AppDelegateViewController类,但它似乎不起作用。我在这里有什么遗漏吗?

4

2 回答 2

2

尝试通过重复--ignore标志,

--ignore .m \
--ignore AppDelegate.h \
--ignore ViewController.h \

希望有帮助!

于 2014-02-25T11:43:07.960 回答
0

就我而言,我通常只为我的模型创建文档,而忽略我的 PODS 和所有视图控制器。

看看我是如何设置的:

APPLEDOC_PATH=`which appledoc`
if [ $APPLEDOC_PATH ]; then
    $APPLEDOC_PATH \
    --project-name "My APP" \
    --project-company "My Company Name" \
    --company-id "" \
    --output "PATH DIR" \
    --keep-undocumented-objects \
    --keep-undocumented-members \
    --keep-intermediate-files \
    --no-repeat-first-par \
    --no-warn-invalid-crossref \
    --ignore ".m" \
    --ignore "Pods" \
    --ignore "*Controller.h" \
    --ignore "*Cell.h" \
    --explicit-crossref \
    --keep-undocumented-objects \
    --keep-undocumented-members \
    --use-single-star \
    --no-repeat-first-par \
    --no-warn-missing-arg \
    --no-warn-undocumented-object \
    --no-warn-undocumented-member \
    --no-warn-empty-description \
    --exit-threshold 2 \
    ${PROJECT_DIR}/${PRODUCT_NAME}
fi;

我忽略了所有这些文件:

    --ignore ".m" \             #all my .m files
    --ignore "Pods" \           # All my PODS
    --ignore "*Controller.h"  \ # any controlers (a.k.a ViewController, TablewViewController, CollectionViewController )
    --ignore "*Cell.h" \        # Any cell (a.k.a UITableViewCell, UICollectionViewCell)
于 2016-02-01T16:00:14.717 回答