Link the files
This commit is contained in:
Родитель
c4505ab4af
Коммит
06d7d7aa73
|
@ -29,11 +29,11 @@ The setting points to a list of JSON files that follows the [HTML Custom Data sc
|
|||
|
||||
The two demos show two different scenarios:
|
||||
|
||||
1. `src/web-components.html-data.json`. This shows how users who have written components and wish to use them in HTML can take advantage of Custom Data.
|
||||
1. [`src/web-components.html-data.json`](./src/web-components.html-data.json). This shows how users who have written components and wish to use them in HTML can take advantage of Custom Data.
|
||||
|
||||
The JSON file `src/web-component.html-data.json` can either be hand-written or generated by tools such as https://github.com/runem/web-component-analyzer.
|
||||
|
||||
2. `node_modules/@github/time-elements/web-components.html-data.json`. This shows how WebComponents library authors can distribute Custom Data with their components to offer documentation, auto completion and hover information to end users. This is similar to how today JavaScript library authors distribute their packages with [TypeScript type definitions](https://www.typescriptlang.org/docs/handbook/declaration-files/introduction.html). (For example, look at `node_modules/@github/time-elements/index.d.ts`).
|
||||
2. [`node_modules/@github/time-elements/web-components.html-data.json`](node_modules/@github/time-elements/web-components.html-data.json). This shows how WebComponents library authors can distribute Custom Data with their components to offer documentation, auto completion and hover information to end users. This is similar to how today JavaScript library authors distribute their packages with [TypeScript type definitions](https://www.typescriptlang.org/docs/handbook/declaration-files/introduction.html). (For example, look at `node_modules/@github/time-elements/index.d.ts`).
|
||||
|
||||
The Custom Data for [@github/time-elements](https://github.com/github/time-elements) currently is hand-written, but in the future it might be possible to:
|
||||
- Use an analyzer to examine the JS entry file and generate such Custom Data
|
||||
|
|
Загрузка…
Ссылка в новой задаче