JetBrains / web-types

JSON standard for documenting web component libraries for IDEs, documentation generators and other tools
Apache License 2.0
278 stars 25 forks source link

Better error handling for vue-docgen-web-types #37

Open tminich opened 2 years ago

tminich commented 2 years ago

I couldn't find any option to get more verbose error messages if something goes wrong during generation, I just get this:

Building web-types to C:\dev\module-laravel-app\web-types.json
Error building web-types: Error building file C:\dev\module-laravel-app\web-types.json: Unexpected token (312:75)

which is really not helpful at all 😄 One of my vue files is throwing it off, I know as much, but there are plenty and manually trying them one by one would be arduous to say the least.

tminich commented 2 years ago

After a bit of fuzzing around it turned out my issue was JSX parsing is on by default. Might be worth pointing out in the docs =)

piotrtomiak commented 2 years ago

@tminich Thanks for the report. The code for the extension is here: https://github.com/JetBrains/web-types/tree/master/gen/vue-docgen-web-types - feel free to provide a PR with the fix. I am not sure when I'll be able to have a look at this.