hello-web-components

A simple starter hello world web component written in typescript, using lit-html and lit-element

Usage no npm install needed!

<script type="module">
  import helloWebComponents from 'https://cdn.skypack.dev/hello-web-components';
</script>

README

hello-web-components

A simple starter <hello-world /> web component written in typescript, using lit-html and lit-element. Unit tested with jest and e2e tested with puppeteer and jest-puppeteer.

Gzip Bundle Size Build Status Coverage Status Known Vulnerabilities

npm version npm downloads

Usage

Clone the repository and modify it to your needs

git clone --depth 1 https://github.com/fernandopasik/hello-web-components.git

Install the package in your project and import the component

yarn add hello-web-components lit-html lit-element
import { html, render } from 'lit-html';
import 'hello-web-components';

const test = () => html`<hello-world who="web components"></hello-world>`;

render(test(), document.body);

License

MIT (c) 2020 Fernando Pasik