Jazzy没有按预期的方式生成快速文档 [英] Jazzy is not working as expected for generating swift documentation

查看:380
本文介绍了Jazzy没有按预期的方式生成快速文档的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在对swift代码的最佳方法进行一些研究之后。我遇到了Jazzy,实现起来很简单。因此,请遵循 Jazzy文档的安装部分。我运行

  sudo gem install jazzy 

然后我导航到我的项目的根,在终端,并运行 jazzy ,它创建一个名为docs的文件夹与一个网站它显示1类的文档。我有87个课程,我可以看到在终端输出中的jazzy循环。



我已经阅读了 NSHipster教程,它也链接到 Jazzy文档以及标记格式参考。我已经记录了一些代码,Xcode在侧窗格中正确显示或右键单击函数或类。所以我相当确定我的语法是正确的。



我花了一些时间将1个文件与另一个未显示的文件进行比较,



我正在运行:




  • jazzy版本:0.3.2

  • Xcode版本:7.1

  • Swift版本:2.1

  • OS X El Capitan版本:10.11



我的整体问题是为什么不为所有类生成文档,如何解决这个问题?

解决方案

阅读更多关于jazzy的更多内容深度我发现这个重要的信息。


默认情况下,jazzy仅记录公开声明。要生成
文档,具有较低的可访问性级别
(内部或私有)的声明,请将--min-acl标志设置为internal或
private。


jazzy git hub页面的故障排除部分中有哪些



我用以下行运行jazzy,以生成我预期的文档:

  jazzy --min-acl private 

注意我应该阅读在我决定某些事情不正常之前的一切。


After doing some research on the best way to document swift code. I came across Jazzy and how simple it was to implement. So I follow the installation section of the Jazzy Documentation. I run

sudo gem install jazzy

Then I navigate to the root of my project, in the terminal, and run jazzy which creates a folder called "docs" with a website that displays documentation for 1 class. I have 87 classes which I can visibly see jazzy looping through in the terminal output.

I've read the NSHipster Tutorial about documenting code which also links you to the Jazzy Documentation as well as the Markup Formatting Reference. I've documented some code, which Xcode displays correctly in the side pane or right clicking the function or class. So i'm fairly certain that my syntax is correct.

I took some time to compare that 1 file to the another file that isn't being displayed and I don't see anything out of the ordinary with regards to format.

I'm running:

  • jazzy version: 0.3.2
  • Xcode version: 7.1
  • Swift version: 2.1
  • OS X El Capitan Version: 10.11

My overall question is; Why isn't jazzy producing documentation for all classes and how can I fix this issue?

解决方案

After reading more about jazzy more in depth I found this important piece of information.

By default, jazzy only documents public declarations. To generate documentation for declarations with a lower accessibility level (internal or private), please set the --min-acl flag to internal or private.

Which is in the trouble shooting portion of the jazzy git hub page

I ran jazzy with the following line to produce the documentation i expected:

jazzy --min-acl private

Note I should read everything before I decided something isn't working right.

这篇关于Jazzy没有按预期的方式生成快速文档的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆