jsduck icon indicating copy to clipboard operation
jsduck copied to clipboard

Support ES6 syntax

Open Meaglin opened this issue 10 years ago • 15 comments

More and more browsers and javascript runtimes(nodejs) start supporting ES6 and the spec is also finalized. Maybe this must be handled by rkelly?

Currently jsduck is broken when new syntax is used.

Meaglin avatar Nov 06 '15 10:11 Meaglin

If jsduck will support es2015?

jsduck lib/ --output docs --builtin-classes
Error: Error while parsing someclass.js: Invalid JavaScript syntax: Unexpected 'class' on line 27

fengmk2 avatar Nov 12 '15 15:11 fengmk2

Any update on this? Did sencha drop jsduck development ?

I see no actual code changes since june 2015

Meaglin avatar Feb 08 '16 10:02 Meaglin

Well, in fact they did. I haven't had much personal incentive to work on JSDuck since then, as I'm not working with Sencha stack any more.

nene avatar Feb 08 '16 10:02 nene

Is there any chance someone else of sencha can pick this up ?

Meaglin avatar Feb 08 '16 14:02 Meaglin

So far nobody has really shown enough interest in this.

nene avatar Feb 08 '16 15:02 nene

I just installed JSDuck specifically to have documentation pages for my ES2015/ES6 NodeJS application. I was a bit surprised when I got an error.

I attempted to run JSDuck on the code after translating it with babel, but the way it organized my classes made it incompatible for reading into JSDuck.

Asuza avatar Feb 08 '16 15:02 Asuza

@nene, do you mean that nobody at Sencha has shown interest, or that there is not enough interest from the internet in general it to merit someone at Sencha working on it?

Asuza avatar Feb 08 '16 15:02 Asuza

Both really. Since Sencha stopped supporting the development of it, there's been zero contact from Sencha regarding anything about JSDuck.

They're still using the last stable 5.3.4 release for their latest API docs. They have stopped using several of the additional features that were built explicitly for their needs: separate tutorials pages, version number detection & user-posted comments.

It feels kind'a similar to the situation before JSDuck, when an old ext-doc tool was practically abandoned, but Sencha was still using it for their docs.

Appcelerator is also still using JSDuck, but they forked their own version a long ago (which is also standing still now). I guess there are also several other larger projects making use of it, but nobody has really shown strong interest in taking JSDuck further.

nene avatar Feb 08 '16 18:02 nene

That's disappointing. JSDuck is the best JavaScript documentation parser/viewer available (as far as I'm aware). I'd probably attempt to get it working for ES6 if it were written in a language I had some experience with.

Asuza avatar Feb 08 '16 18:02 Asuza

Thanks for the kind words.

I guess the implementation language has become much greater of a burden to entry into this project than I would have ever expected. That's probably one of the prime reasons why community interest to helping out with this has been so low. Although it's really more of a psychological boundary - Ruby is really easy to pick up.

nene avatar Feb 08 '16 20:02 nene

Tip to use jsduck on project using ES6: use babel to transpile to es5 then run jsduck after.

remss avatar May 11 '16 12:05 remss

  1. There are cases where babel is moving my /** @class */ definition to the bottom of the file, so now I have a grunt task for moving it back to the top of the file.
  2. The source code linked to from the JSDuck documentation that is generated is the compiled code not the source code. Thats not the code I prefer people to read.

It would be nice to be able to run jsduck on source code.

michaelkantor avatar Nov 18 '16 01:11 michaelkantor

Are there any updates on this issue ? I prefer the style of Jsduck api document, but it could not support React/ES6 syntax, it's bad for current front-end development.

silentbalanceyh avatar Apr 27 '18 15:04 silentbalanceyh

Consider this project as dead. No commit since 2 years.

remss avatar Apr 28 '18 09:04 remss

I don't think the maintainer works at Sencha anymore. And unless someone else wants to pick it up it's dead. Although Sencha has a new version of this but only internally, dunno why.

Meaglin avatar Apr 28 '18 10:04 Meaglin