Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/flippiecoetser/lit.template

Lit Template ES6 Module with Unit Testing and Documentation
https://github.com/flippiecoetser/lit.template

Last synced: 4 days ago
JSON representation

Lit Template ES6 Module with Unit Testing and Documentation

Awesome Lists containing this project

README

        

# Lit Typescript Template

Bundle free lit typescript template used to create a browser compatible es6 module, including unit tests and documentation.

Lit can be loaded from a CDN or from locally installed NPM package. The demo app uses the CDN and the unit test uses the locally install NPM package.

### CDN

```html

{
"imports": {
"calculator": "../lib/calculator.js",
"lit": "https://cdn.jsdelivr.net/gh/lit/dist@3/core/lit-core.min.js",
"lit/": "https://cdn.jsdelivr.net/npm/lit@3/",
"@lit/reactive-element": "https://cdn.jsdelivr.net/npm/@lit/[email protected]/reactive-element.js",
"@lit/reactive-element/": "https://cdn.jsdelivr.net/npm/@lit/[email protected]/",
"@lit/reactive-element/decorators/": "https://cdn.jsdelivr.net/npm/@lit/[email protected]/decorators/"
}
}

```

### NPM

```html

{
"imports": {
"calculator": "../lib/Calculator.js",
"lit": "../node_modules/lit/index.js",
"lit/": "../node_modules/lit/",
"lit-element/lit-element.js": "../node_modules/lit-element/lit-element.js",
"lit-html/": "../node_modules/lit-html/",
"lit-html": "../node_modules/lit-html/lit-html.js",
"@lit/reactive-element": "../node_modules/@lit/reactive-element/reactive-element.js",
"@lit/reactive-element/": "../node_modules/@lit/reactive-element/"
}
}

```

Note: Unit test requires additional configuration. See `wallaby.js`, `karma.conf.js` and `importmap.js` for details.