如何使用HeaderDoc在Xcode中生成SWIFT文件的HTML文档?

问题描述 投票:11回答:1

我尝试使用HeaderDoc在Xcode中记录我的Swift项目,但只处理文件“.h”并忽略文件“.swift”

这是我的swift文件:

/// test
///
/// :param: ann blabla
func testFunc( ann: Foo ) { .. }

我在终端中运行以下命令:

headerdoc2html -o ~/Desktop/docum Ninja

This is the error:

    Documentation will be written to /Users/me/Desktop/docum
    HTML output mode.
    No valid input files specified. 

        Usage: headerdoc2html [-dq] [-o <output directory>] <input file(s) or directory>.

    iMac:MyApp me$  headerdoc2html -o ~/Desktop/docum Ninja/

    Documentation will be written to /Users/me/Desktop/docum
    HTML output mode.
    DIR Ninja/
    ======= Parsing Input Files =======

    Processing Ninja/Test.m
        Skipping. No HeaderDoc comments found.

    Processing Ninja/-Bridging-Header.h
ios shell swift xcode6 headerdoc
1个回答
21
投票

Yeah...

截至目前,HeaderDoc无法使用headerdoc2html将Swift内联文档转换为HTML文件。你和所有人(包括我自己)都不得不等待。


Other options

因此,“三大”iOS代码文档工具是HeaderDoc,AppleDocDoxygen。可悲的是,这三个人都不支持Swift。好消息:AppleDoc即将推出v3.0,其他两个也可能(也可能会)更新。 AppleDoc是开源的,所以如果你精通代码,你可以根据自己的需要进行调整(使用swift和所有爵士乐)

编辑:

我评论了AppleDoc的Github页面并得到了几个回复。主要是,2014年10月16日苹果正在召开会议。在这次会议之后,AppleDoc人员(加尔斯?)将开始为AppleDoc 3.0添加Swift支持,它将在某个时候发布。


Speaking of Jazz

Jazzy现在就出来了(!)并且可以为Swift创建HTML格式的文档(!!)我很难设置它,它的格式是非正统的,但如果你不能等待三巨头更新,它可能只是为了你。

祝你的冒险好运。

ZR

© www.soinside.com 2019 - 2024. All rights reserved.