open-wc / custom-elements-manifest

Custom Elements Manifest is a file format that describes custom elements in your project.
https://custom-elements-manifest.open-wc.org/
227 stars 37 forks source link

Do not output `type` property for CSS properties doc blocks #148

Open peschee opened 2 years ago

peschee commented 2 years ago

This

import { LitElement } from 'lit-element';

/**
 * @cssprop {color} [--var-test=red] Test css custom prop
 */
export class MyElement extends LitElement {}

would output

{
  "cssProperties": [
    {
      "type": {
        "text": "color"
      },
      "description": "Test css custom prop",
      "name": "--var-test",
      "default": "red"
    }
  ]
}

While the CssCustomProperty has no type in the schema: https://github.com/webcomponents/custom-elements-manifest/blob/a07ec8fd1aa921532bba0e8af21ee993f3bda2a5/schema.d.ts#L322-L354

netlify[bot] commented 2 years ago

✔️ Deploy Preview for custom-elements-manifest-analyzer ready!

🔨 Explore the source changes: d3c9258d168acc26152f7d62ef4418f57660b84c

🔍 Inspect the deploy log: https://app.netlify.com/sites/custom-elements-manifest-analyzer/deploys/6187eb532f0b5d00074060d6

😎 Browse the preview: https://deploy-preview-148--custom-elements-manifest-analyzer.netlify.app

break-stuff commented 1 year ago

My plugin relies on this type being set in the manifest

peschee commented 1 year ago

@break-stuff It is not defined in the schema though. However, is maybe the syntax something you could work with?

https://github.com/webcomponents/custom-elements-manifest/blob/main/schema.d.ts#L394

break-stuff commented 1 year ago

I think that should work for me.