-
Notifications
You must be signed in to change notification settings - Fork 240
Some questions keep popping up. Here are the canonical answers.
A: Use the --ext-namespaces=Ext,YourNamespace
option to make the parser understand both Ext.define()
and YourNamespace.define()
.
A: First off, see if you can extend JSDuck by by yourself by implementing custom tags.
If this didn't work out, or you think it would be a generally useful feature, post a new issue and try to convince us that JSDuck should support it. Is it supported by some other documentation tool? Tell us which one and link to the relevant documentation if possible. Is it used by some major JavaScript project? Again, give us examples and links.
A: JSDuck is focused on documenting JavaScript source code (with some rudimentary support for documentation in CSS and SCSS files), if you're trying to run JSDuck over the source code of any other language, you're just asking for trouble. JSDuck uses a full-blown JavaScript parser to understand the source code, so if you feed it something that's not valid JavaScript, it will just stop with an error.
A: JSDuck expects all member names to be proper JavaScript identifier names. This means only 0...9, A...Z, a...z, _ and $. Class names can additionally contain dots (.
). Anything else that happens to work should be considered a bug and not relied on.
Here's a separate article about the reasons for not supporting other characters.
A: The comments server is available as a separate project. See https://github.com/senchalabs/jsduck-comments
Yes, you can, and some people already do. JSDuck will happily parse any valid JavaScript, but as its auto-detection capabilities are tuned for ExtJS, you'll probably need to document more things explicitly with @tags
rather than relying on the auto-detection.
You should also consider whether JSDuck is a good fit for the kind of JavaScript you write. If you're structuring your code in OOP-manner (like Ext JS is structured) JSDuck is probably a good fit. But when you're structuring your code in functional style (like jQuery), you might be better off with a different tool.
A: Ext JS 5 divides it's classes between two directories, you need to include both: ext/src
and ext/packages/sencha-core
.