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.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for creating this great project! I am able to use it for some of our api doc extraction already.
I have hit two problems in my Typescript/LitElement project:
If I add extra doc tags for things that are not automatically picked up, e.g. @fires change, those seem to be ignored
Some of the tags from your examples trigger errors when scanning.
I am seeing errors like this:
Fatal error: Invalid regular expression: /^(\s*?\{(?<type>.*)\})?(((?<name1>.+)(\s\-\s)(?<comment1>.+))|(\s?\-\s)(?<comment2>.+)|(?<name2>.*?))$/: Invalid group
SyntaxError: Invalid regular expression: /^(\s*?\{(?<type>.*)\})?(((?<name1>.+)(\s\-\s)(?<comment1>.+))|(\s?\-\s)(?<comment2>.+)|(?<name2>.*?))$/: Invalid group
at parseJsDocTag (/Users/mitaylor/Scratch/wc-analyze-test/node_modules/web-component-analyzer/lib/index.cjs.js:241:17)
I have attached a simple test project that demonstrates this (wc-analyze-test.zip).
Unzip the directory
cd wc-analyze-test
npm install
npm run analyze
If I delete some of the tags from component.ts, it runs, but the @fires is ignored. Edit the JSDoc comment to look like:
/**
* Here is a description of my web component.
*
* @element my-element
*
* @fires change - This jsdoc tag makes it possible to document events.
* @fires submit
*/
Then try npm analyze again. It should run, but you won't see any mention of the change event in the output.
The text was updated successfully, but these errors were encountered:
Regarding the regex problem I suspect you are running a version of Node less than 10. I use named capture groups and these came to Node in version 10. Sorry that I haven't documented the required Node version anywhere yet! In addition, maybe I can look into getting rid of named capture groups so that the required Node version can be lowered.
Regarding the @fires problem, right now documentation on the github repo is out of sync with the published version because I updated the documentation recently. However I just published version 0.1.9 of web-component-analyzer. I tested it on your test project, and it seems to work fine 🎉
Thanks for creating this great project! I am able to use it for some of our api doc extraction already.
I have hit two problems in my Typescript/LitElement project:
@fires change
, those seem to be ignoredI am seeing errors like this:
I have attached a simple test project that demonstrates this (wc-analyze-test.zip).
cd wc-analyze-test
npm install
npm run analyze
If I delete some of the tags from
component.ts
, it runs, but the@fires
is ignored. Edit the JSDoc comment to look like:Then try
npm analyze
again. It should run, but you won't see any mention of the change event in the output.The text was updated successfully, but these errors were encountered: