question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Given that some tools already support reading and writing the custom-elements.json format, should we take that as a starting point?

On the other hand, @octref has suggested starting from the VS Code Custom Data Format. Whether the format should be based on one IDEs format is a great question to answer.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

6reactions
daKmoRcommented, Oct 28, 2019

I would start “small” and go for it… and then add more stuff step by step

For all use cases, I worked on (documentation, api playground, catalog) the following was good enough. So I would consider it a good starting point.

one adjustment I might see is to adjust type to typeHint or so as discussed in https://github.com/webcomponents/custom-elements-json/issues/6#issuecomment-546749135

{
  "version": 2,
  "tags": [
    {
      "name": "demo-wc-card",
      "description": "This is a container looking like a card with a back and front side you can switch",
      "attributes": [
        {
          "name": "header",
          "type": "String",
          "description": "Shown at the top of the card",
          "default": "Your Message",
          "required": true
        }
      ],
      "properties": [
        {
          "name": "header",
          "type": "String",
          "attribute": "header",
          "description": "Shown at the top of the card",
          "default": "Your Message",
          "required": true
        }
      ],
      "events": [
        {
          "name": "side-changed",
          "description": "Fires whenever it switches between front/back"
        }
      ],
      "slots": [
        {
          "name": "",
          "description": "Content inside the card gets displayed on the front page"
        }
      ],
      "cssProperties": [
        {
          "name": "--demo-wc-card-front-color",
          "description": "Font color for the front",
          "type": "Color"
        },
      ]
    }
  ]
}
3reactions
bahruscommented, Oct 27, 2019

This is probably the schema

Read more comments on GitHub >

github_iconTop Results From Across the Web

Starting Point: Home
Starting Point is the leading expert in quality childcare, early education, and out-of-school time resources in Northeast Ohio. Learn more.
Read more >
A Starting Point
A Starting Point is a civic engagement video-based app that helps voters better understand the issues of the day.
Read more >
Starting Point
Your questions and doubts are welcome here. Starting Point is a gathering where your questions about God turn into a conversation about faith....
Read more >
Welcome - The Starting Point Inc. Of New Jersey
The Starting Point, Inc. of New Jersey is a nonprofit education, referral, and resource center for individuals and families seeking support for mental ......
Read more >
STARTING POINT definition | Cambridge English Dictionary
starting point meaning: 1. a place or position where something begins: 2. a place or position where something begins: . Learn more.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found