nene edited this page Aug 1, 2012 · 2 revisions

(Available since JSDuck 4.0)


@since Ext JS 4.0 beta

Documents that a class or member is available since a particular version. For example:

 * Returns true when store is empty.
 * @since Ext JS 4.0 beta
isEmpty: function() {


Since tracking the versioning of all the bazillion items is a humongous task, JSDuck will do the comparison of different versions by itself and auto-generate all those @since tags. For this to work you need to first generate JSDuck exports of the versions you want to compare against. For example to export versions 1, 2 and 3 of Ext JS you would do something like the following:

$ jsduck -o export/extjs-1.0 --export=full path/to/extjs-1.0/src
$ jsduck -o export/extjs-2.0 --export=full path/to/extjs-2.0/src
$ jsduck -o export/extjs-3.0 --export=full path/to/extjs-3.0/src

Then when generating the docs, you tell JSDuck to import those versions:

$ jsduck -o docs/ path/to/extjs-4.0/src \
                  --import="Ext 1.0:export/extjs-1.0" \
                  --import="Ext 2.0:export/extjs-2.0" \
                  --import="Ext 3.0:export/extjs-3.0" \
                  --import="Ext 4.0"

A colon ":" character is used to separate the version name and path. Versions have to be listed in chronological order, with the last one being just the current version without path.

JSDuck will then check in which version the class/member first appears in and creates an appropriate @since tag. Of course when documentation is not perfect, the auto-detection doesn't always work - for such cases add the @since tag manually (an explicit @since tag will always take precedence over auto-generated one).

Auto-generation of @since tags will also auto-generate @new tags - all the classes/members introduced in the latest version will additionally get a @new tag.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.