runem / web-component-analyzer

CLI that analyzes web components and emits documentation
https://runem.github.io/web-component-analyzer
MIT License
501 stars 63 forks source link

When making your custom flavors, you cannot beneficiate from others #170

Closed fdesforges closed 4 years ago

fdesforges commented 4 years ago

First, thanks for this project.

I have made a custom flavor for handling my Web components library, and i'm using it with the node API :

const result = analyzeSourceFile(file, { 
  program,
  flavors: [new ComponentFlavor()],
  verbose: true
})

So far so good, but I don't get the support for JSDOC properties since I cannot import the jsdoc utils : { getJsDoc, getJsDocType } from "../../util/js-doc-util";

And I cannot get the support of the JSDoc flavor for adding events (@fire).

Exporting the default flavor constant, or each individivual flavors like the commented one here, may be an easy solution (plus the jsdoc helper) : https://github.com/runem/web-component-analyzer/blob/f93d25203438f63257cf6da31709bc25c7e1c5df/src/analyze/index.ts

But i understandard that if you comment them, it's on purpose.

If you want I can propose a pull request, where i will uncomment the jsdoc flavor ?

fire commented 4 years ago

Hi. I am fire.