Dojo2.0式开发模式(规范).doc

Dojo2.0式开发模式(规范)概要1

Dojo Developer Documentation 一、Dojo Inline Documentation Project owner: Neil Roberts since: V1.3 Syntax, keywords and guidelines for Dojo’s inline API documentation format. Introduction The Dojo JavaScript codebase makes use of a consistent commenting style to facilitate generated API documentation, which gives developers an outline of what methods are defined and how to use them. This is analogous to?Javadoc?and similar conventions used in most programming languages today. The documentation parser collects the information from the JavaScript files and produces output in json or XML format. This can be further transformed for use by editors and IDEs for example, or fed into a viewer application for a handy browsable interface to the API. These pages describe the parts of the system and how to use them to generate your own documentation of both Dojo and custom code. API documentation takes the form of comment blocks, typically with one or more keywords. Function parameters may also be hinted inline and return values also indicated inline. Using a Key When parsing a comment block, we give the parser a list of “keys” to look for. These include summary, description, and returns, but many comment blocks will also have all of the variables and parameters in the object or function added to this list of keys as well. Formatting: Each keyword should be on a line by itself, with a space before and a colon after. For variable names there’s a type after the colon. The content associated with the keyword is indented by two tabs. For example: // summary: // This is the summary for the method. // Its indented by two tabs. // foo: Integer // First argument to this function // bar: String // Second argument to this function // returns: // A calculated value. The parser will keep reading content as part of the specified key until it sees a completely blank line, or another keyword. Although our formatting convention requires th

文档评论(0)

1亿VIP精品文档

相关文档