Chapter 2. DocumentJS

Source code alone is insufficient; documentation is an important part of software engineering. DocumentJS is a powerful, yet simple tool designed to easily create searchable documentation for any JavaScript codebase.

In this chapter, we will to get an overview of DocumentJS. We will learn how it works and learn to generate its documentation.

The following are the key features of DocumentJS:

  • Flexible and easy to extend
  • Support Markdown: http://en.wikipedia.org/wiki/Markdown
  • Integrated documentation viewer with API search
  • Works with any JavaScript code and not only with JavaScriptMVC

If you are familiar with JSDoc, YUIDoc, YARD, or similar documentation syntax/tools in then DocumentJS can be learned a, few minutes.

The documentation for DocumentJS can be found at http://javascriptmvc.com/docs.html#!DocumentJS.

Note

Markdown is a text-to-HTML conversion tool that allows you to write using an easy-to-read and easy-to-write plain text format (http://daringfireball.net/projects/markdown).

How does DocumentJS work?

The architecture of DocumentJS is organized around types and tags.

Types represent every relatively independent part of the JavaScript code that we may want to comment, such as classes, functions (methods), or attributes.

Tags provide additional information to types, such as parameters and returns.

DocumentJS parses JavaScript and Markdown files to produce JSONP files that are used by JMVCDoc to render documentation.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.39.133