Closed aarondrabeck closed 4 years ago
Yeah, stringify seems like the way to go. Would you like me to update this PR or are you just going to use #117?
Unfortunately that PR got stuck due to failing tests that I haven't had time to look into. However, I implemented it in the PR https://github.com/runem/web-component-analyzer/pull/127 which will be out with version 1.0.0
very soon :-) Therefore I'm closing this PR now :+1:
If you like, you can test it using:
npx web-component-analyzer@1.0.0-next.4 analyze my-element.js --format json
We also got another PR here: https://github.com/runem/web-component-analyzer/pull/117 that adds
default
to the JSON output. However, that PR outputs the value of the property as a string (with JSON.stringify), and this PR outputs the value as the parsed JSON value.I'm in doubt what would be best served for the format and use-cases. A string might be the easiest/safest choice for consumers of the format, but 'any'-type value might be the most 'flexible' choice. What do you think?