📜 ⬆️ ⬇️

JSDuck - documentation generator

Documentation is an integral part of good code and the project as a whole. Good developers spend a lot of time on supporting documentation, but in the future it pays off with interest: it saves time on maintaining the code, expanding and fixing bugs, reducing the time for immersing new developers in a project, etc. Also, well-documented code implicitly encourages the developer to apply coding standards.

Introduction
Installation
Configuration and launch
Documenting code
Additional pages of documentation
Instead of conclusion




Introduction


Detailed documentation is available on the JSDuck project website .
This article provides a brief overview of JSDuck features and some tips for use.
The generator can be used for any code documented according to its standards. Applications created on ExtJS support the automatic creation of documentation, since the generator was originally created for Sencha and allows you to recognize the ExtJS syntax.
The generated documentation looks just like the official ExtJS documentation .
')

Installation


gem install jsduck

Linux : you need to install the extra dev package for Ruby. Debian requires the ruby1.9-dev package (Ruby 1.9). Red Hat / CentOS / Fedora requires ruby-devel package.
Windows : Must install Ruby and Development Kit


Configuration and launch


Run the generator from the command line

$ jsduck

In this case, the entire configuration must be described by default in the jduck.json file located in the same directory.
You can describe all configuration parameters on the command line without using a configuration file. for example

$ jsduck path/to/src --output docs

But I do not recommend this if you have a lot of configuration options. This is not very convenient and not visual.
You can also specify a different path to the configuration file, if necessary. for example

$ jsduck --config=mypath/to/myconfig.json

Help on all command line parameters can be found with the command

$ jsduck --help

All parameters can be used both from the command line and in the configuration file.

Sample configuration file

 { "--title": "My Application Docs", "--warnings": [ "-all:path/to/extjs/src" ], "--output": "docs", "--": [ "path/to/extjs/src", "path/to/my/app" ] } 

Brief description of the parameters:
title - title title on the documentation page.
warnings - allows you to control the flow of warnings that are written to the console if the documented code does not correspond to the code itself. In the example above, using the "-all" option, all warnings in the extjs framework are ignored.
output - directory generated documentation.
The last section "-" lists the source directories from which the documentation should be generated.


Documenting code


 /** *   ,         Markdown *  ,   "@" (). */ 

The code block looks pretty standard. Inside it, you can use the special Markdown format.
In addition to parsing in blocks, JSDuck analyzes the code and generates documentation, even without blocks, where possible.

Consider some common meta tags.

class

Documents the class name.

 /** * @class MyClass *   MyClass. */ 

Can be recognized automatically in the following cases.

 /** *    . */ function MyClass() { } /** *    . */ MyApp.MyClass = function() { }; /** *    . */ Ext.define("MyApp.MyClass ", { extend: "Ext.Component", ... }); 

param

Documents parameters for methods and events.

 /** * @param {Type} name   name. */ 

Documenting the type is described in this guide .
Parameters can be recognized automatically.

 /** * Sets the width and height of the panel. */ function setSize(width, height) { } 

is equivalent to

 /** * @method setSize * Sets the width and height of the panel. * @param width * @param height */ 

Cross reference

To specify links inside a block to another class or class member (properties, methods), use the {@link} tag. Common format:

{@link Class#member link text}

text can be omitted, it is convenient to use if the class name is too long. Links can be recognized automatically, for example

 /** *     Office.view.Main.    ExtJS, *      Ext.container.Viewport. */ 

In this example, links to Office.view.Main and Ext.container.Viewport will be automatically created.
If the links do not indicate the actually existing classes, then a warning will be displayed in the console.

For more information about meta tags, see the documentation and guide .


Additional pages of documentation


By default, the generator creates a page with api applications. Using the JSDuck configuration, you can optionally add the following pages to the documentation:


The manual page is very useful, it may contain documentation on the processes of deploying and building the application, customizing, using components, etc. I especially recommend using it, instead of text files, which usually contain a description of the application, and which are scattered in various project directories. Collect everything in one place!

Welcome Page

An example of the welcome page is on the official website . If your project is not open to everyone, then there is no point in this page, by and large.

This page consists of a single html file that contains only the code inside the tag.
 ,  -  .  

<h1> !</h1>
--welcome

{ "--title": "My Application Docs", "--welcome": "path/to/my/welcome.html", ... }
--head-html .

"--head-html": '<link rel="stylesheet" href="style.css" type="text/css">'

.
JSON. , --guides

{ "--title": "My Application Docs", "--welcome": "path/to/my/welcome.html", "--guides": "jsduck-guides.json", ... }

jsduck-guides.json

[ { "title": "", "items": [ { "name": "config", "url": "guides/config", "title": " ", "description": " ." }, { "name": "components", "url": "guides/components", "title": "", "description": " ." } ] } ]
. ,

somedir/ jsduck-guides.json guides/ config/ README.md icon.png some-image.png components/ README.md icon.png
README.md ( Markdown), . icon.png .


.
. . , . , , . , . JSON JSDuck --categories

{ "--title": "My Application Docs", "--welcome": "path/to/my/welcome.html", "--guides": "jsduck-guides.json", "--categories": "jsduck-cat.json", ... }
jsduck-cat.json

[ { "name": "MyApp base classes", "groups": [ { "name": "Application", "classes": [ "MyApp .Application", "MyApp .controller.Main", "MyApp .view.Main" ] }, { "name": "View", "classes": [ "MyApp .view.*.*" ] }, { "name": "Widgets", "classes": [ "MyApp .widget.*" ] }, ... ] }, ... ]



JSDuck Siesta . .
, - .

<h1> !</h1>

--welcome

{ "--title": "My Application Docs", "--welcome": "path/to/my/welcome.html", ... }
--head-html .

"--head-html": '<link rel="stylesheet" href="style.css" type="text/css">'

.
JSON. , --guides

{ "--title": "My Application Docs", "--welcome": "path/to/my/welcome.html", "--guides": "jsduck-guides.json", ... }

jsduck-guides.json

[ { "title": "", "items": [ { "name": "config", "url": "guides/config", "title": " ", "description": " ." }, { "name": "components", "url": "guides/components", "title": "", "description": " ." } ] } ]
. ,

somedir/ jsduck-guides.json guides/ config/ README.md icon.png some-image.png components/ README.md icon.png
README.md ( Markdown), . icon.png .


.
. . , . , , . , . JSON JSDuck --categories

{ "--title": "My Application Docs", "--welcome": "path/to/my/welcome.html", "--guides": "jsduck-guides.json", "--categories": "jsduck-cat.json", ... }
jsduck-cat.json

[ { "name": "MyApp base classes", "groups": [ { "name": "Application", "classes": [ "MyApp .Application", "MyApp .controller.Main", "MyApp .view.Main" ] }, { "name": "View", "classes": [ "MyApp .view.*.*" ] }, { "name": "Widgets", "classes": [ "MyApp .widget.*" ] }, ... ] }, ... ]



JSDuck Siesta . .
 ,  -  .  

<h1> !</h1>

--welcome

{ "--title": "My Application Docs", "--welcome": "path/to/my/welcome.html", ... }
--head-html .

"--head-html": '<link rel="stylesheet" href="style.css" type="text/css">'

.
JSON. , --guides

{ "--title": "My Application Docs", "--welcome": "path/to/my/welcome.html", "--guides": "jsduck-guides.json", ... }

jsduck-guides.json

[ { "title": "", "items": [ { "name": "config", "url": "guides/config", "title": " ", "description": " ." }, { "name": "components", "url": "guides/components", "title": "", "description": " ." } ] } ]
. ,

somedir/ jsduck-guides.json guides/ config/ README.md icon.png some-image.png components/ README.md icon.png
README.md ( Markdown), . icon.png .


.
. . , . , , . , . JSON JSDuck --categories

{ "--title": "My Application Docs", "--welcome": "path/to/my/welcome.html", "--guides": "jsduck-guides.json", "--categories": "jsduck-cat.json", ... }
jsduck-cat.json

[ { "name": "MyApp base classes", "groups": [ { "name": "Application", "classes": [ "MyApp .Application", "MyApp .controller.Main", "MyApp .view.Main" ] }, { "name": "View", "classes": [ "MyApp .view.*.*" ] }, { "name": "Widgets", "classes": [ "MyApp .widget.*" ] }, ... ] }, ... ]



JSDuck Siesta . .
, - .

<h1> !</h1>

--welcome

{ "--title": "My Application Docs", "--welcome": "path/to/my/welcome.html", ... }
--head-html .

"--head-html": '<link rel="stylesheet" href="style.css" type="text/css">'

.
JSON. , --guides

{ "--title": "My Application Docs", "--welcome": "path/to/my/welcome.html", "--guides": "jsduck-guides.json", ... }

jsduck-guides.json

[ { "title": "", "items": [ { "name": "config", "url": "guides/config", "title": " ", "description": " ." }, { "name": "components", "url": "guides/components", "title": "", "description": " ." } ] } ]
. ,

somedir/ jsduck-guides.json guides/ config/ README.md icon.png some-image.png components/ README.md icon.png
README.md ( Markdown), . icon.png .


.
. . , . , , . , . JSON JSDuck --categories

{ "--title": "My Application Docs", "--welcome": "path/to/my/welcome.html", "--guides": "jsduck-guides.json", "--categories": "jsduck-cat.json", ... }
jsduck-cat.json

[ { "name": "MyApp base classes", "groups": [ { "name": "Application", "classes": [ "MyApp .Application", "MyApp .controller.Main", "MyApp .view.Main" ] }, { "name": "View", "classes": [ "MyApp .view.*.*" ] }, { "name": "Widgets", "classes": [ "MyApp .widget.*" ] }, ... ] }, ... ]



JSDuck Siesta . .
 ,  -  .  

<h1> !</h1>

--welcome

{ "--title": "My Application Docs", "--welcome": "path/to/my/welcome.html", ... }
--head-html .

"--head-html": '<link rel="stylesheet" href="style.css" type="text/css">'

.
JSON. , --guides

{ "--title": "My Application Docs", "--welcome": "path/to/my/welcome.html", "--guides": "jsduck-guides.json", ... }

jsduck-guides.json

[ { "title": "", "items": [ { "name": "config", "url": "guides/config", "title": " ", "description": " ." }, { "name": "components", "url": "guides/components", "title": "", "description": " ." } ] } ]
. ,

somedir/ jsduck-guides.json guides/ config/ README.md icon.png some-image.png components/ README.md icon.png
README.md ( Markdown), . icon.png .


.
. . , . , , . , . JSON JSDuck --categories

{ "--title": "My Application Docs", "--welcome": "path/to/my/welcome.html", "--guides": "jsduck-guides.json", "--categories": "jsduck-cat.json", ... }
jsduck-cat.json

[ { "name": "MyApp base classes", "groups": [ { "name": "Application", "classes": [ "MyApp .Application", "MyApp .controller.Main", "MyApp .view.Main" ] }, { "name": "View", "classes": [ "MyApp .view.*.*" ] }, { "name": "Widgets", "classes": [ "MyApp .widget.*" ] }, ... ] }, ... ]



JSDuck Siesta . .
, - .

<h1> !</h1>

--welcome

{ "--title": "My Application Docs", "--welcome": "path/to/my/welcome.html", ... }
--head-html .

"--head-html": '<link rel="stylesheet" href="style.css" type="text/css">'

.
JSON. , --guides

{ "--title": "My Application Docs", "--welcome": "path/to/my/welcome.html", "--guides": "jsduck-guides.json", ... }

jsduck-guides.json

[ { "title": "", "items": [ { "name": "config", "url": "guides/config", "title": " ", "description": " ." }, { "name": "components", "url": "guides/components", "title": "", "description": " ." } ] } ]
. ,

somedir/ jsduck-guides.json guides/ config/ README.md icon.png some-image.png components/ README.md icon.png
README.md ( Markdown), . icon.png .


.
. . , . , , . , . JSON JSDuck --categories

{ "--title": "My Application Docs", "--welcome": "path/to/my/welcome.html", "--guides": "jsduck-guides.json", "--categories": "jsduck-cat.json", ... }
jsduck-cat.json

[ { "name": "MyApp base classes", "groups": [ { "name": "Application", "classes": [ "MyApp .Application", "MyApp .controller.Main", "MyApp .view.Main" ] }, { "name": "View", "classes": [ "MyApp .view.*.*" ] }, { "name": "Widgets", "classes": [ "MyApp .widget.*" ] }, ... ] }, ... ]



JSDuck Siesta . .
, - .

<h1> !</h1>

--welcome

{ "--title": "My Application Docs", "--welcome": "path/to/my/welcome.html", ... }
--head-html .

"--head-html": '<link rel="stylesheet" href="style.css" type="text/css">'

.
JSON. , --guides

{ "--title": "My Application Docs", "--welcome": "path/to/my/welcome.html", "--guides": "jsduck-guides.json", ... }

jsduck-guides.json

[ { "title": "", "items": [ { "name": "config", "url": "guides/config", "title": " ", "description": " ." }, { "name": "components", "url": "guides/components", "title": "", "description": " ." } ] } ]
. ,

somedir/ jsduck-guides.json guides/ config/ README.md icon.png some-image.png components/ README.md icon.png
README.md ( Markdown), . icon.png .


.
. . , . , , . , . JSON JSDuck --categories

{ "--title": "My Application Docs", "--welcome": "path/to/my/welcome.html", "--guides": "jsduck-guides.json", "--categories": "jsduck-cat.json", ... }
jsduck-cat.json

[ { "name": "MyApp base classes", "groups": [ { "name": "Application", "classes": [ "MyApp .Application", "MyApp .controller.Main", "MyApp .view.Main" ] }, { "name": "View", "classes": [ "MyApp .view.*.*" ] }, { "name": "Widgets", "classes": [ "MyApp .widget.*" ] }, ... ] }, ... ]



JSDuck Siesta . .
, - .

<h1> !</h1>

--welcome

{ "--title": "My Application Docs", "--welcome": "path/to/my/welcome.html", ... }
--head-html .

"--head-html": '<link rel="stylesheet" href="style.css" type="text/css">'

.
JSON. , --guides

{ "--title": "My Application Docs", "--welcome": "path/to/my/welcome.html", "--guides": "jsduck-guides.json", ... }

jsduck-guides.json

[ { "title": "", "items": [ { "name": "config", "url": "guides/config", "title": " ", "description": " ." }, { "name": "components", "url": "guides/components", "title": "", "description": " ." } ] } ]
. ,

somedir/ jsduck-guides.json guides/ config/ README.md icon.png some-image.png components/ README.md icon.png
README.md ( Markdown), . icon.png .


.
. . , . , , . , . JSON JSDuck --categories

{ "--title": "My Application Docs", "--welcome": "path/to/my/welcome.html", "--guides": "jsduck-guides.json", "--categories": "jsduck-cat.json", ... }
jsduck-cat.json

[ { "name": "MyApp base classes", "groups": [ { "name": "Application", "classes": [ "MyApp .Application", "MyApp .controller.Main", "MyApp .view.Main" ] }, { "name": "View", "classes": [ "MyApp .view.*.*" ] }, { "name": "Widgets", "classes": [ "MyApp .widget.*" ] }, ... ] }, ... ]



JSDuck Siesta . .
 ,  -  .  

<h1> !</h1>

--welcome

{ "--title": "My Application Docs", "--welcome": "path/to/my/welcome.html", ... }
--head-html .

"--head-html": '<link rel="stylesheet" href="style.css" type="text/css">'

.
JSON. , --guides

{ "--title": "My Application Docs", "--welcome": "path/to/my/welcome.html", "--guides": "jsduck-guides.json", ... }

jsduck-guides.json

[ { "title": "", "items": [ { "name": "config", "url": "guides/config", "title": " ", "description": " ." }, { "name": "components", "url": "guides/components", "title": "", "description": " ." } ] } ]
. ,

somedir/ jsduck-guides.json guides/ config/ README.md icon.png some-image.png components/ README.md icon.png
README.md ( Markdown), . icon.png .


.
. . , . , , . , . JSON JSDuck --categories

{ "--title": "My Application Docs", "--welcome": "path/to/my/welcome.html", "--guides": "jsduck-guides.json", "--categories": "jsduck-cat.json", ... }
jsduck-cat.json

[ { "name": "MyApp base classes", "groups": [ { "name": "Application", "classes": [ "MyApp .Application", "MyApp .controller.Main", "MyApp .view.Main" ] }, { "name": "View", "classes": [ "MyApp .view.*.*" ] }, { "name": "Widgets", "classes": [ "MyApp .widget.*" ] }, ... ] }, ... ]



JSDuck Siesta . .
, - .

<h1> !</h1>

--welcome

{ "--title": "My Application Docs", "--welcome": "path/to/my/welcome.html", ... }
--head-html .

"--head-html": '<link rel="stylesheet" href="style.css" type="text/css">'

.
JSON. , --guides

{ "--title": "My Application Docs", "--welcome": "path/to/my/welcome.html", "--guides": "jsduck-guides.json", ... }

jsduck-guides.json

[ { "title": "", "items": [ { "name": "config", "url": "guides/config", "title": " ", "description": " ." }, { "name": "components", "url": "guides/components", "title": "", "description": " ." } ] } ]
. ,

somedir/ jsduck-guides.json guides/ config/ README.md icon.png some-image.png components/ README.md icon.png
README.md ( Markdown), . icon.png .


.
. . , . , , . , . JSON JSDuck --categories

{ "--title": "My Application Docs", "--welcome": "path/to/my/welcome.html", "--guides": "jsduck-guides.json", "--categories": "jsduck-cat.json", ... }
jsduck-cat.json

[ { "name": "MyApp base classes", "groups": [ { "name": "Application", "classes": [ "MyApp .Application", "MyApp .controller.Main", "MyApp .view.Main" ] }, { "name": "View", "classes": [ "MyApp .view.*.*" ] }, { "name": "Widgets", "classes": [ "MyApp .widget.*" ] }, ... ] }, ... ]



JSDuck Siesta . .
 ,  -  .  

<h1> !</h1>

--welcome

{ "--title": "My Application Docs", "--welcome": "path/to/my/welcome.html", ... }
--head-html .

"--head-html": '<link rel="stylesheet" href="style.css" type="text/css">'

.
JSON. , --guides

{ "--title": "My Application Docs", "--welcome": "path/to/my/welcome.html", "--guides": "jsduck-guides.json", ... }

jsduck-guides.json

[ { "title": "", "items": [ { "name": "config", "url": "guides/config", "title": " ", "description": " ." }, { "name": "components", "url": "guides/components", "title": "", "description": " ." } ] } ]
. ,

somedir/ jsduck-guides.json guides/ config/ README.md icon.png some-image.png components/ README.md icon.png
README.md ( Markdown), . icon.png .


.
. . , . , , . , . JSON JSDuck --categories

{ "--title": "My Application Docs", "--welcome": "path/to/my/welcome.html", "--guides": "jsduck-guides.json", "--categories": "jsduck-cat.json", ... }
jsduck-cat.json

[ { "name": "MyApp base classes", "groups": [ { "name": "Application", "classes": [ "MyApp .Application", "MyApp .controller.Main", "MyApp .view.Main" ] }, { "name": "View", "classes": [ "MyApp .view.*.*" ] }, { "name": "Widgets", "classes": [ "MyApp .widget.*" ] }, ... ] }, ... ]



JSDuck Siesta . .
, - .

<h1> !</h1>

--welcome

{ "--title": "My Application Docs", "--welcome": "path/to/my/welcome.html", ... }
--head-html .

"--head-html": '<link rel="stylesheet" href="style.css" type="text/css">'

.
JSON. , --guides

{ "--title": "My Application Docs", "--welcome": "path/to/my/welcome.html", "--guides": "jsduck-guides.json", ... }

jsduck-guides.json

[ { "title": "", "items": [ { "name": "config", "url": "guides/config", "title": " ", "description": " ." }, { "name": "components", "url": "guides/components", "title": "", "description": " ." } ] } ]
. ,

somedir/ jsduck-guides.json guides/ config/ README.md icon.png some-image.png components/ README.md icon.png
README.md ( Markdown), . icon.png .


.
. . , . , , . , . JSON JSDuck --categories

{ "--title": "My Application Docs", "--welcome": "path/to/my/welcome.html", "--guides": "jsduck-guides.json", "--categories": "jsduck-cat.json", ... }
jsduck-cat.json

[ { "name": "MyApp base classes", "groups": [ { "name": "Application", "classes": [ "MyApp .Application", "MyApp .controller.Main", "MyApp .view.Main" ] }, { "name": "View", "classes": [ "MyApp .view.*.*" ] }, { "name": "Widgets", "classes": [ "MyApp .widget.*" ] }, ... ] }, ... ]



JSDuck Siesta . .
 ,  -  .  

<h1> !</h1>

--welcome

{ "--title": "My Application Docs", "--welcome": "path/to/my/welcome.html", ... }
--head-html .

"--head-html": '<link rel="stylesheet" href="style.css" type="text/css">'

.
JSON. , --guides

{ "--title": "My Application Docs", "--welcome": "path/to/my/welcome.html", "--guides": "jsduck-guides.json", ... }

jsduck-guides.json

[ { "title": "", "items": [ { "name": "config", "url": "guides/config", "title": " ", "description": " ." }, { "name": "components", "url": "guides/components", "title": "", "description": " ." } ] } ]
. ,

somedir/ jsduck-guides.json guides/ config/ README.md icon.png some-image.png components/ README.md icon.png
README.md ( Markdown), . icon.png .


.
. . , . , , . , . JSON JSDuck --categories

{ "--title": "My Application Docs", "--welcome": "path/to/my/welcome.html", "--guides": "jsduck-guides.json", "--categories": "jsduck-cat.json", ... }
jsduck-cat.json

[ { "name": "MyApp base classes", "groups": [ { "name": "Application", "classes": [ "MyApp .Application", "MyApp .controller.Main", "MyApp .view.Main" ] }, { "name": "View", "classes": [ "MyApp .view.*.*" ] }, { "name": "Widgets", "classes": [ "MyApp .widget.*" ] }, ... ] }, ... ]



JSDuck Siesta . .
, - .

<h1> !</h1>

--welcome

{ "--title": "My Application Docs", "--welcome": "path/to/my/welcome.html", ... }
--head-html .

"--head-html": '<link rel="stylesheet" href="style.css" type="text/css">'

.
JSON. , --guides

{ "--title": "My Application Docs", "--welcome": "path/to/my/welcome.html", "--guides": "jsduck-guides.json", ... }

jsduck-guides.json

[ { "title": "", "items": [ { "name": "config", "url": "guides/config", "title": " ", "description": " ." }, { "name": "components", "url": "guides/components", "title": "", "description": " ." } ] } ]
. ,

somedir/ jsduck-guides.json guides/ config/ README.md icon.png some-image.png components/ README.md icon.png
README.md ( Markdown), . icon.png .


.
. . , . , , . , . JSON JSDuck --categories

{ "--title": "My Application Docs", "--welcome": "path/to/my/welcome.html", "--guides": "jsduck-guides.json", "--categories": "jsduck-cat.json", ... }
jsduck-cat.json

[ { "name": "MyApp base classes", "groups": [ { "name": "Application", "classes": [ "MyApp .Application", "MyApp .controller.Main", "MyApp .view.Main" ] }, { "name": "View", "classes": [ "MyApp .view.*.*" ] }, { "name": "Widgets", "classes": [ "MyApp .widget.*" ] }, ... ] }, ... ]



JSDuck Siesta . .
, - .

<h1> !</h1>

--welcome

{ "--title": "My Application Docs", "--welcome": "path/to/my/welcome.html", ... }
--head-html .

"--head-html": '<link rel="stylesheet" href="style.css" type="text/css">'

.
JSON. , --guides

{ "--title": "My Application Docs", "--welcome": "path/to/my/welcome.html", "--guides": "jsduck-guides.json", ... }

jsduck-guides.json

[ { "title": "", "items": [ { "name": "config", "url": "guides/config", "title": " ", "description": " ." }, { "name": "components", "url": "guides/components", "title": "", "description": " ." } ] } ]
. ,

somedir/ jsduck-guides.json guides/ config/ README.md icon.png some-image.png components/ README.md icon.png
README.md ( Markdown), . icon.png .


.
. . , . , , . , . JSON JSDuck --categories

{ "--title": "My Application Docs", "--welcome": "path/to/my/welcome.html", "--guides": "jsduck-guides.json", "--categories": "jsduck-cat.json", ... }
jsduck-cat.json

[ { "name": "MyApp base classes", "groups": [ { "name": "Application", "classes": [ "MyApp .Application", "MyApp .controller.Main", "MyApp .view.Main" ] }, { "name": "View", "classes": [ "MyApp .view.*.*" ] }, { "name": "Widgets", "classes": [ "MyApp .widget.*" ] }, ... ] }, ... ]



JSDuck Siesta . .
, - .

<h1> !</h1>

--welcome

{ "--title": "My Application Docs", "--welcome": "path/to/my/welcome.html", ... }
--head-html .

"--head-html": '<link rel="stylesheet" href="style.css" type="text/css">'

.
JSON. , --guides

{ "--title": "My Application Docs", "--welcome": "path/to/my/welcome.html", "--guides": "jsduck-guides.json", ... }

jsduck-guides.json

[ { "title": "", "items": [ { "name": "config", "url": "guides/config", "title": " ", "description": " ." }, { "name": "components", "url": "guides/components", "title": "", "description": " ." } ] } ]
. ,

somedir/ jsduck-guides.json guides/ config/ README.md icon.png some-image.png components/ README.md icon.png
README.md ( Markdown), . icon.png .


.
. . , . , , . , . JSON JSDuck --categories

{ "--title": "My Application Docs", "--welcome": "path/to/my/welcome.html", "--guides": "jsduck-guides.json", "--categories": "jsduck-cat.json", ... }
jsduck-cat.json

[ { "name": "MyApp base classes", "groups": [ { "name": "Application", "classes": [ "MyApp .Application", "MyApp .controller.Main", "MyApp .view.Main" ] }, { "name": "View", "classes": [ "MyApp .view.*.*" ] }, { "name": "Widgets", "classes": [ "MyApp .widget.*" ] }, ... ] }, ... ]



JSDuck Siesta . .
 ,  -  .  

<h1> !</h1>

--welcome

{ "--title": "My Application Docs", "--welcome": "path/to/my/welcome.html", ... }
--head-html .

"--head-html": '<link rel="stylesheet" href="style.css" type="text/css">'

.
JSON. , --guides

{ "--title": "My Application Docs", "--welcome": "path/to/my/welcome.html", "--guides": "jsduck-guides.json", ... }

jsduck-guides.json

[ { "title": "", "items": [ { "name": "config", "url": "guides/config", "title": " ", "description": " ." }, { "name": "components", "url": "guides/components", "title": "", "description": " ." } ] } ]
. ,

somedir/ jsduck-guides.json guides/ config/ README.md icon.png some-image.png components/ README.md icon.png
README.md ( Markdown), . icon.png .


.
. . , . , , . , . JSON JSDuck --categories

{ "--title": "My Application Docs", "--welcome": "path/to/my/welcome.html", "--guides": "jsduck-guides.json", "--categories": "jsduck-cat.json", ... }
jsduck-cat.json

[ { "name": "MyApp base classes", "groups": [ { "name": "Application", "classes": [ "MyApp .Application", "MyApp .controller.Main", "MyApp .view.Main" ] }, { "name": "View", "classes": [ "MyApp .view.*.*" ] }, { "name": "Widgets", "classes": [ "MyApp .widget.*" ] }, ... ] }, ... ]



JSDuck Siesta . .
, - .

<h1> !</h1>

--welcome

{ "--title": "My Application Docs", "--welcome": "path/to/my/welcome.html", ... }
--head-html .

"--head-html": '<link rel="stylesheet" href="style.css" type="text/css">'

.
JSON. , --guides

{ "--title": "My Application Docs", "--welcome": "path/to/my/welcome.html", "--guides": "jsduck-guides.json", ... }

jsduck-guides.json

[ { "title": "", "items": [ { "name": "config", "url": "guides/config", "title": " ", "description": " ." }, { "name": "components", "url": "guides/components", "title": "", "description": " ." } ] } ]
. ,

somedir/ jsduck-guides.json guides/ config/ README.md icon.png some-image.png components/ README.md icon.png
README.md ( Markdown), . icon.png .


.
. . , . , , . , . JSON JSDuck --categories

{ "--title": "My Application Docs", "--welcome": "path/to/my/welcome.html", "--guides": "jsduck-guides.json", "--categories": "jsduck-cat.json", ... }
jsduck-cat.json

[ { "name": "MyApp base classes", "groups": [ { "name": "Application", "classes": [ "MyApp .Application", "MyApp .controller.Main", "MyApp .view.Main" ] }, { "name": "View", "classes": [ "MyApp .view.*.*" ] }, { "name": "Widgets", "classes": [ "MyApp .widget.*" ] }, ... ] }, ... ]



JSDuck Siesta . .
 ,  -  .  

<h1> !</h1>

--welcome

{ "--title": "My Application Docs", "--welcome": "path/to/my/welcome.html", ... }
--head-html .

"--head-html": '<link rel="stylesheet" href="style.css" type="text/css">'

.
JSON. , --guides

{ "--title": "My Application Docs", "--welcome": "path/to/my/welcome.html", "--guides": "jsduck-guides.json", ... }

jsduck-guides.json

[ { "title": "", "items": [ { "name": "config", "url": "guides/config", "title": " ", "description": " ." }, { "name": "components", "url": "guides/components", "title": "", "description": " ." } ] } ]
. ,

somedir/ jsduck-guides.json guides/ config/ README.md icon.png some-image.png components/ README.md icon.png
README.md ( Markdown), . icon.png .


.
. . , . , , . , . JSON JSDuck --categories

{ "--title": "My Application Docs", "--welcome": "path/to/my/welcome.html", "--guides": "jsduck-guides.json", "--categories": "jsduck-cat.json", ... }
jsduck-cat.json

[ { "name": "MyApp base classes", "groups": [ { "name": "Application", "classes": [ "MyApp .Application", "MyApp .controller.Main", "MyApp .view.Main" ] }, { "name": "View", "classes": [ "MyApp .view.*.*" ] }, { "name": "Widgets", "classes": [ "MyApp .widget.*" ] }, ... ] }, ... ]



JSDuck Siesta . .
, - .

<h1> !</h1>

--welcome

{ "--title": "My Application Docs", "--welcome": "path/to/my/welcome.html", ... }
--head-html .

"--head-html": '<link rel="stylesheet" href="style.css" type="text/css">'

.
JSON. , --guides

{ "--title": "My Application Docs", "--welcome": "path/to/my/welcome.html", "--guides": "jsduck-guides.json", ... }

jsduck-guides.json

[ { "title": "", "items": [ { "name": "config", "url": "guides/config", "title": " ", "description": " ." }, { "name": "components", "url": "guides/components", "title": "", "description": " ." } ] } ]
. ,

somedir/ jsduck-guides.json guides/ config/ README.md icon.png some-image.png components/ README.md icon.png
README.md ( Markdown), . icon.png .


.
. . , . , , . , . JSON JSDuck --categories

{ "--title": "My Application Docs", "--welcome": "path/to/my/welcome.html", "--guides": "jsduck-guides.json", "--categories": "jsduck-cat.json", ... }
jsduck-cat.json

[ { "name": "MyApp base classes", "groups": [ { "name": "Application", "classes": [ "MyApp .Application", "MyApp .controller.Main", "MyApp .view.Main" ] }, { "name": "View", "classes": [ "MyApp .view.*.*" ] }, { "name": "Widgets", "classes": [ "MyApp .widget.*" ] }, ... ] }, ... ]



JSDuck Siesta . .

, - .

<h1> !</h1>

--welcome

{ "--title": "My Application Docs", "--welcome": "path/to/my/welcome.html", ... }
--head-html .

"--head-html": '<link rel="stylesheet" href="style.css" type="text/css">'

.
JSON. , --guides

{ "--title": "My Application Docs", "--welcome": "path/to/my/welcome.html", "--guides": "jsduck-guides.json", ... }

jsduck-guides.json

[ { "title": "", "items": [ { "name": "config", "url": "guides/config", "title": " ", "description": " ." }, { "name": "components", "url": "guides/components", "title": "", "description": " ." } ] } ]
. ,

somedir/ jsduck-guides.json guides/ config/ README.md icon.png some-image.png components/ README.md icon.png
README.md ( Markdown), . icon.png .


.
. . , . , , . , . JSON JSDuck --categories

{ "--title": "My Application Docs", "--welcome": "path/to/my/welcome.html", "--guides": "jsduck-guides.json", "--categories": "jsduck-cat.json", ... }
jsduck-cat.json

[ { "name": "MyApp base classes", "groups": [ { "name": "Application", "classes": [ "MyApp .Application", "MyApp .controller.Main", "MyApp .view.Main" ] }, { "name": "View", "classes": [ "MyApp .view.*.*" ] }, { "name": "Widgets", "classes": [ "MyApp .widget.*" ] }, ... ] }, ... ]



JSDuck Siesta . .

, - .

<h1> !</h1>

--welcome

{ "--title": "My Application Docs", "--welcome": "path/to/my/welcome.html", ... }
--head-html .

"--head-html": '<link rel="stylesheet" href="style.css" type="text/css">'

.
JSON. , --guides

{ "--title": "My Application Docs", "--welcome": "path/to/my/welcome.html", "--guides": "jsduck-guides.json", ... }

jsduck-guides.json

[ { "title": "", "items": [ { "name": "config", "url": "guides/config", "title": " ", "description": " ." }, { "name": "components", "url": "guides/components", "title": "", "description": " ." } ] } ]
. ,

somedir/ jsduck-guides.json guides/ config/ README.md icon.png some-image.png components/ README.md icon.png
README.md ( Markdown), . icon.png .


.
. . , . , , . , . JSON JSDuck --categories

{ "--title": "My Application Docs", "--welcome": "path/to/my/welcome.html", "--guides": "jsduck-guides.json", "--categories": "jsduck-cat.json", ... }
jsduck-cat.json

[ { "name": "MyApp base classes", "groups": [ { "name": "Application", "classes": [ "MyApp .Application", "MyApp .controller.Main", "MyApp .view.Main" ] }, { "name": "View", "classes": [ "MyApp .view.*.*" ] }, { "name": "Widgets", "classes": [ "MyApp .widget.*" ] }, ... ] }, ... ]



JSDuck Siesta . .

Source: https://habr.com/ru/post/214591/


All Articles