有没有办法生成像Google Closure Library API文档这样的Javascript API文档? [英] Is there a way to generate Javascript API documentation like the Google Closure Library API Documentation?

查看:153
本文介绍了有没有办法生成像Google Closure Library API文档这样的Javascript API文档?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试找到一个为我的Javascript源代码生成HTML文档的工具。

I'm trying to find a tool that generates HTML documentation for my Javascript source code.

有人知道Google用来生成界面的工具吗?以下网址是开源的吗?我能够产生类似的输出吗?

Does anyone know if the tool that Google uses to generate the interface at the following URLs is open source? Would I be able to generate similar output?

http:// closure-library.googlecode.com/svn/docs/class_goog_proto2_Serializer.html

http://closure-library.googlecode.com/svn/docs/namespace_goog_date.html

http://closure-library.googlecode.com/svn/docs/ namespace_goog_events.html

http://closure-library.googlecode.com/svn/docs/class_goog_gears_Database.html

http://closure-library.googlecode.com/svn/docs/class_goog_ui_DatePicker .html

我知道 http://code.google.com/p/jsdoc-toolkit/

但我想知道具体的发电机是否谷歌使用的是我可用于我自己的来源(如果重要的话,这将是开源的。)

But I'd like to know if the specific generator that Google uses is available for me to use for my own source (which is going to be open source, if that matters).

提前致谢...

推荐答案

Google Closure + JSDoc



正如您在评论中提到的那样,它们基于 JSDoc Toolkit 构建,以添加Closure Compiler用于类型的特殊注释 - 检查和其他事情,但这意味着你也可以在封闭代码之上使用JSDoc来生成你的文档。生成具有所需外观的输出只是编写自己的模板和样式表的问题。

Google Closure + JSDoc

As you mentioned yourself in your comment, they build on JSDoc Toolkit to add special annotations used by the Closure Compiler for type-checking and other things, but this means you can also just use JSDoc on top of closure code to generate your documentation. Generating an output with the desired look and feel is then only a matter of writing your own template and stylesheet.

Google Closure工具都是开源的,除了一些位目前尚未披露。在任何情况下,您都可以查看文档和源代码,看看它们用于生成Javadoc的内容。

The Google Closure Tools are all open source except for some bits that aren't disclosed at the moment. In any case, you can have a look at the documentation and source code and see what they use to generate Javadocs.

另一个你可以看一下灵感并看看它们是如何做到的是 ExtJS的在线文档。我发现首先导航有点令人困惑,但你很快就习惯了。一个开源项目, Ext-Doc ,生成具有类似风格的文档,它现在有点过时了。

Another one you could possibly have a look at for inspiration and to see how they do it is the online doc for ExtJS. I find it a bit confusing to navigate at first, but you get used to it fairly quickly. An open source project, Ext-Doc, generates documentation with a similar style, though it is now a bit outdated.

正如Matthew Manela所提到的,YUI Doc也提供了非常好的在线文档。

As mentioned by Matthew Manela, YUI Doc produces pretty good online documentation as well.

我的建议是去JSDoc,因为它是许多工具的事实标准,它反映了Java实践,但是它真的取决于你想要的东西。

My advice would be to go for JSDoc as it is the de-facto standard for many tools and it reflects Java practices, but it's really up to what you want.

这篇关于有没有办法生成像Google Closure Library API文档这样的Javascript API文档?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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