nuxtlabs / nuxt-component-meta

Gather Nuxt components metadata on build time and make them available on production.
69 stars 6 forks source link

extra quotes in string values #41

Closed farnabaz closed 1 year ago

farnabaz commented 2 years ago

String values are wrapped in a single quote and this extra quote seems redundant. Removing these extra quotes brings simplicity to the users.

{
        "name": "hello",
        "default": "'Hello'",
        ....
}
Tahul commented 1 year ago

@farnabaz is this still relevant?

farnabaz commented 1 year ago

I think it is still relevant, because Vue component meta doesn't remove these extra quotes

Tahul commented 1 year ago

👍, will take care of that

Tahul commented 1 year ago

@farnabaz ; I explored excluding extra quotes, but I'm afraid it will have to be done upstream.

I think extra quotes are actually "valid" in the sense that Vue Component Meta returns the whole content of props default.

I'm afraid that if we apply normalization for such values, we might have do to it in lots of places.

@Atinux ; do you think we should try to push for improvements upstream (vue-component-meta ?)?

stafyniaksacha commented 1 year ago

I think extra quotes are actually "valid" in the sense that Vue Component Meta returns the whole content of props default.

Actually they make a sense, it tells that the value is a literal string. So we can distinguish Foo as interface/type and "Foo" as literal string.

image
farnabaz commented 1 year ago

I see, so I'm closing this.