Clojure文档工具的最新技术 [英] State of the Art for Clojure Documentation Tools
问题描述
我真的很喜欢 Marginalia ,如果你想采取像识字编程方法。 Marginalia遍历您的源代码,并生成一个html格式的版本,其中的注释设置在一个非常明确的文本中的代码旁边。评论可以被格式化,使得非常可读的最终文件。在审查我之前写过的源代码时,我发现Marginalia真的有帮助。 以下是由Marginalia来源本身制作的示例。
请注意,这与原始的识字编程工作流程不同,您可以在其中编写文件,并从中生成源代码。使用Marginalia,您可以编写一个常规的源代码文件,这是从中删除的文档。输出类似于可读写编程所期望的结果,但是通过这种方式,您仍然可以在编辑器中预期语法高亮,无需任何特殊的识字编程支持。
它互操作与莱宁宁,我相信蛋糕,虽然我还没有尝试过这个。
Over the last year or so I've seen various announcements on the Clojure discussion list and other places about tools for documenting Clojure code. These range from full-on literate programming systems like Marginalia, and the tool being used to create the book "Clojure in Small Pieces" (or even emacs org-mode), to more conventional Javadoc-style solutions like Autodoc, and Javadoc itself which reportedly can be used with Clojure. A google search turns up various others, perhaps a few that deserve more attention, and for sure some that are just personal utilities for generating docs. My question is what are the best documentation tools, and what are their comparative strengths and weaknesses based on your experiences using them? I have not used any documentation tools to date, and am interested in experimenting with one or more.
I really like Marginalia if you want to take something like a literate programming approach. Marginalia traverses your source code, and produces an html formatted version with comments set beside code in a very clear text. Comments can be markdown formatted, making for a very readable final document. When reviewing source code that I've written some time ago, I find Marginalia really helps. Here's an example made from the Marginalia source itself.
Note that this differs from the original literate programming workflow, where you would write a file and source code is generated from that. With Marginalia, you write a regular source code file, and it's the documentation that's pulled out of that. The output is similar to what one might expect from literate programming, but this way you can still expect syntax highlighting in an editor, without any special literate programming support.
It interoperates with Leiningen, and I believe cake, though I haven't tried that myself.
这篇关于Clojure文档工具的最新技术的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!