{"id":16396288,"url":"https://github.com/rgladwell/wcs-microdata","last_synced_at":"2025-02-23T06:13:45.169Z","repository":{"id":57408847,"uuid":"120358535","full_name":"rgladwell/wcs-microdata","owner":"rgladwell","description":"Polymer mixin to support microdata properties","archived":false,"fork":false,"pushed_at":"2020-07-08T11:15:15.000Z","size":1017,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-13T10:24:18.787Z","etag":null,"topics":["polymer","polymer-mixin","polymer2","webcomponents"],"latest_commit_sha":null,"homepage":null,"language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rgladwell.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-02-05T20:36:31.000Z","updated_at":"2020-07-08T11:15:14.000Z","dependencies_parsed_at":"2022-08-30T22:31:07.793Z","dependency_job_id":null,"html_url":"https://github.com/rgladwell/wcs-microdata","commit_stats":null,"previous_names":["rgladwell/polymer-microdata"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rgladwell%2Fwcs-microdata","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rgladwell%2Fwcs-microdata/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rgladwell%2Fwcs-microdata/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rgladwell%2Fwcs-microdata/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rgladwell","download_url":"https://codeload.github.com/rgladwell/wcs-microdata/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240275924,"owners_count":19775616,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["polymer","polymer-mixin","polymer2","webcomponents"],"created_at":"2024-10-11T05:06:58.171Z","updated_at":"2025-02-23T06:13:45.147Z","avatar_url":"https://github.com/rgladwell.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# wcs-microdata [![Build Status](https://travis-ci.org/rgladwell/wcs-microdata.svg?branch=master)](https://travis-ci.org/rgladwell/wcs-microdata)\n\nWeb components mixin to support microdata properties.\n\nTo install wcs-microdata run the following:\n\n```sh\n\u003e npm install wcs-microdata --save\n```\n\nYou can then decorate your custom elements as follows:\n\n```js\nimport { MicrodataMixin } from '../wcs-microdata.js'\nimport { LitElement, html } from 'lit-element'\n\nclass MyMicrodataElement extends MicrodataMixin(LitElement) {\n\n  static get is() { return 'my-microdata-element' }\n\n  static get properties() {\n    return {\n      name: {\n        type: String\n      }\n    }\n  }\n\n  render() {\n    return html`\u003cspan id=\"name\"\u003e${this.name}\u003c/span\u003e`\n  }\n}\n\ncustomElements.define(MyMicrodataElement.is, MyMicrodataElement)\n\n```\n\nYou can then populate your element properties using microdata syntax as follows:\n\n\n```html\n\u003cmy-microdata-element itemscope\u003e\n  \u003cspan itemprop=\"name\"\u003emy-name\u003c/span\u003e\n\u003c/my-microdata-element\u003e\n```\n\nThis should render as:\n\n```html\n\u003cp\u003emy-name\u003c/p\u003e\n```\n\n## Hacking\n\nTo modify `polymer-microdata` you need the following installed:\n\n  * [Node](https://nodejs.org/en/download/package-manager/)\n  * [Polymer CLI](https://github.com/Polymer/tools/tree/master/packages/cli#installation)\n\nOnce you've cloned the repo run the following shell commands:\n\n```shell\n\u003e npm install\n```\n\nYou can run the tests as follows:\n\n```shell\n\u003e npm test\n```\n\nOr you can run the test suite in your browser by running `polymer serve --open` and copy-and-pasting `http://127.0.0.1:8081/components/polymer-microdata/test/` into your address bar.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frgladwell%2Fwcs-microdata","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frgladwell%2Fwcs-microdata","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frgladwell%2Fwcs-microdata/lists"}