esdoc-plugins icon indicating copy to clipboard operation
esdoc-plugins copied to clipboard

Only json output

Open Tyratox opened this issue 8 years ago • 4 comments

Does the "esdoc-ecmascript-proposal-plugin" plugin intentionally only generate json output (index.json and the 'ast' folder) or am I missing something? My config (same as in the readme):

{
  "source": "./src",
  "destination": "./doc",
  "plugins": [
      {"name": "esdoc-ecmascript-proposal-plugin", "option": {"all": true}}
   ]
}

Tyratox avatar Aug 16 '17 20:08 Tyratox

I'm having the same problem, where only index.json and the ast directory are being generated, though I'm using a couple more plugins:

{
	"source": "./src",
	"destination": "./public/doc",
	"includes": ["\\.jsx?$"],
	"plugins": [
		{"name": "esdoc-ecmascript-proposal-plugin", "option": {"all": true}},
		{"name": "esdoc-jsx-plugin", "option": {"enable": true}},
		{"name": "esdoc-flow-type-plugin", "option": {"enable": true}}
	]
}

(I'm using esdoc 1.0.3, esdoc-ecmascript-proposal-plugin 1.0.0, esdoc-jsx-plugin 1.0.0 and esdoc-flow-type-plugin 1.0.1, all from npm.)

After briefly digging around in esdoc's source, I found that if (!plugin[handlerName]) continue; (esdoc/out/src/Plugin/Plugin.js:52) seems to happen very often during parsing for onHandleCode and onHandleAST, but I don't think that's an issue. Once all the parsing is complete, however, onHandleDocs, onPublish and onComplete all fail to trigger three times each (presumably once per plugin).

heimskr avatar Sep 26 '17 05:09 heimskr

It could be that either of the plugins is needed:

I'm not sure but it would make sense that this changed when esdoc switched to the plugin mechanism. (just a wild guess)

pixelass avatar Feb 12 '18 18:02 pixelass

I think @pixelass is right, I noticed that if you add the esdoc-standard-plugin on top of the esdoc-typescript-plugin the HTML is generated correctly. I'm guessing the same is true for the ecmascript-proposal-plugin. See https://jan-molak.github.com/tiny-types generated from this .esdoc.json

jan-molak avatar Feb 18 '18 21:02 jan-molak

Was anybody ever able to get this resolved? I am running into the issue right now. If not I can come back and update this thread if I find anything useful.

ajmeese7 avatar Jul 07 '22 01:07 ajmeese7