How to document the classes within overrides folder with jsduck

101 Views Asked by At

With the following architecture, how to document the classes within overrides folder with jsduck.

 MyApp
 -app
 -overrides
 -plugins
 -resources
 -...

It seems only possible to document the classes within the app folder. In my jsduck documentation only displays the folders 'app' and 'Ext'

And how do you create a link to a file within the folder overrides. The following options do not work:

{@link overrides.file file}
{@link MyApp.overrides.file file}

EDITED:

MyApp
-app 
 . panel
   . panel.MyController.js
     . onPrintButtonMethod (overrides.printPanel.js)
-overrides
 . overrides.printPanel.js
-plugins
-resources
-...

I tried the following solutions but appears not documented in jsduck any reference to the class 'override.PrintPanel'. What is the best way to document this case?

/**
*@class myapp.panel.MyController
*@class overrides.PrintPanel 
*
*@override myapp.panel.MyController
*@override Ext.panel.Panel
*/
Ext.define('overrides.PrintPanel', {
  override: 'Ext.panel.Panel',
  …
});

Folders and files shown in jsduck:

- MyApp
  -app
   - store
   - ux
   - view
     - panel
       -panel.MyController.js
- Ext
  -Microloader
  global
1

There are 1 best solutions below

1
Rene Saarsoo On

Take a look at the @override tag docs.

Regarding @links to source files, these aren't supported by JSDuck. Though they shouldn't really be needed - the documented methods/classes/etc will automatically link to the source file. You could use hard-coded Markdown or HTML links if you really wanted.